             [chime :refer [chime-at]]
             [cook.mesos.heartbeat :as heartbeat]
             [cook.mesos.share :as share]
-            [swiss.arrows :refer :all])
+            [swiss.arrows :refer :all]
+            [clojure.core.cache :as cache])
   (import java.util.concurrent.TimeUnit))
 
 (defn now


(defn start-offer-matcher!
  "Create a thread to repeatedly pull from matcher-chan and have the offer matched."
  [conn pending-jobs-atom matcher-chan]
  (async/thread
    (log/debug "offer matcher started")
    (try

               {:instance (str (count (:job/instance job-ent)))})
             "UTF-8")
     executor-key executor-value}))

(defn rescind-offer!
  [rescinded-offer-id-cache offer-id]
  (log/info "Rescinding offer" offer-id)
  (swap! rescinded-offer-id-cache (fn [c]
                                    (if (cache/has? c offer-id)
                                      (cache/hit c offer-id)
                                      (cache/miss c offer-id offer-id)))))

(timers/deftimer [cook-mesos scheduler handle-status-update-duration])
(meters/defmeter [cook-mesos scheduler tasks-killed-in-status-update])
