    If agent doesn't know anything, timeout will have to kick in and fail the job.
    Email users about agent disconnect and affected exec-vertex ids"
   [interval-ms]
-  (while true
-    (let [ts-threshold (- (util/now) interval-ms)
-          agent-job-map (track/dead-agents-job-map @tracker ts-threshold)
-          dead-agents (keys agent-job-map)
-          vertex-ids (reduce into #{} (vals agent-job-map))]
-
-
-      (when (-> vertex-ids empty? not)
-        (log/info "Dead agent check, dead agents:" dead-agents ", affected vertex-ids:" vertex-ids)
-
-        ; mark status as unknown in db
-        (db/update-execution-vertices-status vertex-ids data/unknown-status (util/now))
-
-        ; remove from tracker
-        (swap! tracker track/rm-agents dead-agents)
-
-        (notify/dead-agents dead-agents vertex-ids))
-
-      (Thread/sleep interval-ms))))
+  (let [ts-threshold (- (util/now) interval-ms)
+        agent-job-map (track/dead-agents-job-map @tracker ts-threshold)
+        dead-agents (keys agent-job-map)
+        vertex-ids (reduce into #{} (vals agent-job-map))]
+
+    (when (-> vertex-ids empty? not)
+      (log/info "Dead agent check, dead agents:" dead-agents ", affected vertex-ids:" vertex-ids)
+
+      ; mark status as unknown in db
+      (db/update-execution-vertices-status vertex-ids data/unknown-status (util/now))
+
+      ; remove from tracker
+      (swap! tracker track/rm-agents dead-agents)
+
+      (notify/dead-agents dead-agents vertex-ids))))
+
 
 
 ;-----------------------------------------------------------------------

  (log/info "Initializing Quartz.")
  (quartz/init quartz-chan)
  ; quartz puts stuff on the quartz-chan when a trigger is fired
  (run-quartz-processing quartz-chan)


  (log/info "Populating Quartz.")

    (log/info "No agents connected. Broadcasting registration and waiting..")
    (put! publish-chan {:topic "broadcast" :data {:msg :agents-register}})
    (Thread/sleep 1000)))


(defn- populate-cache
