      identity
      matched)))
 
-(defn compile-pre-task-functions [lifecycles task-name]
+(defn compile-start-task-functions [lifecycles task-name]
+  (compile-lifecycle-functions lifecycles task-name :lifecycle/start-task?))
+
+(defn compile-before-task-functions [lifecycles task-name]
   (compile-lifecycle-functions lifecycles task-name :lifecycle/before-task))
 
-(defn compile-pre-batch-task-functions [lifecycles task-name]
+(defn compile-before-batch-task-functions [lifecycles task-name]
   (compile-lifecycle-functions lifecycles task-name :lifecycle/before-batch))
 
-(defn compile-post-batch-task-functions [lifecycles task-name]
+(defn compile-after-batch-task-functions [lifecycles task-name]
   (compile-lifecycle-functions lifecycles task-name :lifecycle/after-batch))
 
-(defn compile-post-task-functions [lifecycles task-name]
+(defn compile-after-task-functions [lifecycles task-name]
   (compile-lifecycle-functions lifecycles task-name :lifecycle/after-task))
 
 (defrecord TaskLifeCycle

  (stop [component]
    (taoensso.timbre/info (format "[%s] Stopping Task LifeCycle for %s" id (:onyx.core/task (:pipeline-data component))))
    (when-let [event (:pipeline-data component)]
      ((:onyx.core/compiled-post-fn event) (l-ext/close-lifecycle-resources* event))

      ;; Ensure task operations are finished before closing peer connections
      (close! (:seal-ch component))

(defn inject-batch-resources [event]
  (let [cycle-params {:onyx.core/lifecycle-id (java.util.UUID/randomUUID)}
        results (l-ext/inject-batch-resources* event)]
    (merge event cycle-params results ((:onyx.core/compiled-before-batch-fn event) results))))

(defn read-batch [event]
  (let [rets (p-ext/read-batch event)]
