From 2f78e04b12af0d89a94ced14190871f50193ad02 Mon Sep 17 00:00:00 2001 From: seki Date: Fri, 31 Mar 2017 22:42:26 +0900 Subject: [PATCH] Add some logs --- src/clj/job_streamer/control_bus/component/dispatcher.clj | 4 ++++ src/clj/job_streamer/control_bus/component/jobs.clj | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/clj/job_streamer/control_bus/component/dispatcher.clj b/src/clj/job_streamer/control_bus/component/dispatcher.clj index 0a00d1e..61682e6 100644 --- a/src/clj/job_streamer/control_bus/component/dispatcher.clj +++ b/src/clj/job_streamer/control_bus/component/dispatcher.clj @@ -24,6 +24,7 @@ (jobs/save-execution jobs (:db/id execution) new-exec)))))) (defn- dispatch [{:keys [dispatcher-ch datomic]} agt execution-request] + (log/debug "dispatch job to agent" agt) (ag/execute-job agt execution-request @@ -40,6 +41,7 @@ :on-success (fn [{:keys [execution-id batch-status start-time] :as res}] + (log/debug "success to dispatch") (if execution-id (d/transact datomic [(merge {:db/id (:request-id execution-request) @@ -54,6 +56,7 @@ :job-execution/batch-status :batch-status/abandoned}]))))) (defn submit [{:keys [dispatcher-ch datomic]} execution-request] + (log/debug "submit execution-request " execution-request) (try (put! dispatcher-ch execution-request) (d/transact datomic @@ -67,6 +70,7 @@ (when-let [_ ( (d/transact @@ -696,11 +697,13 @@ :job-execution/job-parameters (pr-str (or (:edn ctx) {}))} [:db/add job-id :job/executions execution-id]]) :tempids)] + (log/debug "set execution-id " (-> tempids vals first)) (when-let [time-monitor (d/pull datomic '[{:job/time-monitor [:time-monitor/duration {:time-monitor/action [:db/ident]}]}] job-id)] + (log/debug "set time-monitor") (scheduler/time-keeper scheduler (d/resolve-tempid datomic tempids execution-id)