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


(defn recover-state
  [state]
  (let [{:keys [onyx.core/task-id onyx.core/peer-opts] :as event} (get-event state)
        _ (cleanup-previous-state-store! state)
        state-serializers (onyx.state.serializers.utils/event->state-serializers event)
        db-name (db-name event)

            (.update received-timer (- curr-time hb) TimeUnit/NANOSECONDS))
          (all-heartbeat-times messenger))))

(s/defn next-iteration [state]
  {:post [(empty? (:onyx.core/batch (:event %)))]}
  (-> state
      (set-context! nil)
