         subscriber (m/subscriber messenger)]
     (if (sub/blocked? subscriber)
       (if (synced? state)
-        (let [{:keys [onyx.core/monitoring] :as event} (get-event state)
+        (let [{:keys [onyx.core/monitoring]} (get-event state)
               watermarks (state->watermarks state)]
           (.set ^AtomicLong (:workflow-watermark monitoring) (:input watermarks))
           (.set ^AtomicLong (:coordinator-watermark monitoring) (:coordinator watermarks))

                state-fn-builders)))

(defn build-task-fns
  [{:keys [onyx.core/task-map] :as event}]
  (let [task-types (cond-> #{(node-type event)}
                     (windowed-task? event) (conj :windowed))
        phase-order [:recover :start-iteration :barriers :process-batch :heartbeat]]

                   (not-empty (clojure.set/intersection task-types (:type lifecycle)))))
         (map (fn [lifecycle] (assoc lifecycle :fn ((:builder lifecycle) event))))
         (vec))))

;; Used in tests to detect when a task stop is called
(defn stop-flag! [])

(defn notify-created-db! [state-store-ch replica-version event state-store]
