 
 (defn offer-heartbeats
   [{:keys [messenger] :as state}]
+  (swap! coordinator-log conj :offer-heartbeats)
   (run! pub/offer-heartbeat! (m/publishers messenger))
   (assoc state :last-heartbeat-time (System/nanoTime)))
 
-(def coordinator-backoff-ms 1)
+(def coordinator-backoff-ms 500)
 
 (defn offer-barriers [{:keys [messenger barrier] :as state}]
   (if (:offering? barrier)

(defn complete-job
  [{:keys [tenancy-id log job-id messenger checkpoint group-ch] :as state}]
  (info (format "Job %s completed, and final checkpoint has finished. Writing checkpoint coordinates." job-id))
  (let [replica-version (m/replica-version messenger)
        epoch (m/epoch messenger)]
    (let [coordinates {:tenancy-id tenancy-id 

                                   :write-version next-write-version}))))

(defn schedule-next-barrier [state barrier-period-ns]
  (swap! coordinator-log conj :schedule-next-barrier)
  (update state :barrier merge {:scheduled? true
                                :next-barrier-time (+ (System/nanoTime) barrier-period-ns)}))

