 (defn zookeeper [opts]
   (map->ZooKeeper {:opts opts}))
 
-(defn trailing-id [s]
+(defn leaf [s]
   (last (clojure.string/split s #"/")))
 
 (defn serialize-edn [x]

(defmethod extensions/bucket-at [ZooKeeper :task]
  [sync _ subpath]
  (let [prefix (:onyx/id (:opts sync))
        job-id (trailing-id subpath) 
        children (or (zk/children (:conn sync) (task-path prefix job-id)) [])]
    (map #(str (task-path prefix job-id) "/" %) children)))


(defmethod extensions/resolve-node [ZooKeeper :task]
  [sync _ job-node & more]
  (let [prefix (:onyx/id (:opts sync))]
    (task-path prefix (leaf job-node))))

(defmethod extensions/children ZooKeeper
  [sync node]
