 
   (kill-instance [this {:keys [id service-id] :as instance}]
     (if (scheduler/service-exists? this service-id)
-      (let [completion-promise (promise)]
-        (send id->service-agent kill-instance service-id id
+      (let [completion-promise (promise)
+            message "Killed using scheduler API"]
+        (send id->service-agent kill-instance service-id id message
               port->reservation-atom port-grace-period-ms
               completion-promise)
         (let [result (deref completion-promise)


(defn- kill-instance
  "Deletes the instance corresponding to service-id/instance-id and returns the updated id->service map"
  [id->service service-id instance-id port->reservation-atom port-grace-period-ms completion-promise]
  (try
    (if (contains? id->service service-id)
      (let [{:keys [id->instance]} (get id->service service-id)

            (deliver completion-promise :deleted)
            (-> id->service
                (update-in [service-id :service :instances] dec)
                (update-in [service-id :id->instance instance-id] assoc
                           :killed? true
                           :message message
                           :shell-scheduler/process nil)))
          (do
            (log/info "instance" instance-id "does not exist")
            (deliver completion-promise :no-such-instance-exists)
