             (>!! (:onyx.core/complete-ch event) true))))
       (recur))))
 
-(defrecord TaskLifeCycle [id log queue job task opts]
+(defrecord TaskLifeCycle [id log queue job task err-ch opts]
   component/Lifecycle
 
   (start [component]

          complete-task-dead-ch (chan)

          catalog (extensions/read-chunk log :catalog job)
          ingress-queues (:task/ingress-queues (:task payload))

          pipeline-data {:onyx.core/id id
                         :onyx.core/task task
                         :onyx.core/catalog catalog
                         :onyx.core/workflow (extensions/read-chunk log :workflow (:job-id payload))
                         :onyx.core/task-map (find-task catalog task)
                         :onyx.core/serialized-task (:task payload)
                         :onyx.core/ingress-queues ingress-queues
                         :onyx.core/egress-queues (:task/egress-queues (:task payload))
                         :onyx.core/payload-ch payload-ch
                         :onyx.core/complete-ch complete-ch
                         :onyx.core/params (or (get (:onyx.peer/fn-params opts) task) [])
                         :onyx.core/drained-back-off (or (:onyx.peer/drained-back-off opts) 400)
                         :onyx.core/queue queue

        :pipeline-data pipeline-data)))

  (stop [component]
    (taoensso.timbre/info (format "[%s] Stopping Task LifeCycle for %s" id (:task/name task)))

    (close! (:open-session-kill-ch component))
    (<!! (:open-session-dead-ch component))
