 (defmethod extensions/bucket-at [ZooKeeper :task]
   [sync _ subpath]
   (let [prefix (:onyx/id (:opts sync))
-        job-id (trailing-id subpath) 
+        job-id (leaf 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 (trailing-id job-node))))

(defmethod extensions/children ZooKeeper
  [sync node]

  (:require [clojure.data.fressian :as fressian]
            [com.stuartsierra.component :as component]
            [taoensso.timbre]
            [zookeeper :as zk]
            [zookeeper.util :as util]
            [onyx.extensions :as extensions])
  (:import [java.util UUID]
           [org.apache.curator.test TestingServer]))

