     [clojure.java.jdbc :as jdbc]
 
     [clojure.tools.logging :as logging]
-    [logbug.debug :as debug]
-
+    [logbug.debug :as debug :refer [I> I>> identity-with-logging]]
   ))
 
 

                   Math/floor int)))
    (assoc spec :dispatch_storm_delay_seconds (dispatch-storm-delay-default))))

(defn- normalize-task-spec [raw-spec]
  (-> raw-spec
      clojure.walk/keywordize-keys
      (dissoc :job_id)
      normalize-aggregate-succes
      normalize-dispatch-storm-delay))


;##############################################################################

                        :state (if (empty? errors) "pending" "aborted")
                        :id (util/idid2id job-id (:id db-task-spec))
                        })]
    (first (jdbc/insert! tx "tasks" task-row))))


