            bytes (compress chunk)]
        (zk/create conn node :persistent? true :data bytes)))))
 
+(defmethod extensions/write-chunk [ZooKeeper :lifecycles]
+  [{:keys [conn opts prefix] :as log} kw chunk id]
+  (clean-up-broken-connections
+   (fn []
+     (let [node (str (lifecycles-path prefix) "/" id)
+           bytes (compress chunk)]
+       (zk/create conn node :persistent? true :data bytes)))))
+
 (defmethod extensions/write-chunk [ZooKeeper :task]
   [{:keys [conn opts prefix] :as log} kw chunk id]
   (clean-up-broken-connections


(defn flow-path [prefix]
  (str (prefix-path prefix) "/flow"))

(defn task-path [prefix]
  (str (prefix-path prefix) "/task"))

      (zk/create conn (catalog-path onyx-id) :persistent? true)
      (zk/create conn (workflow-path onyx-id) :persistent? true)
      (zk/create conn (flow-path onyx-id) :persistent? true)
      (zk/create conn (lifecycles-path onyx-id) :persistent? true)
      (zk/create conn (task-path onyx-id) :persistent? true)
      (zk/create conn (sentinel-path onyx-id) :persistent? true)
      (zk/create conn (chunk-path onyx-id) :persistent? true)
