Permalink
Browse files

added more return q logging

  • Loading branch information...
George Jahad
George Jahad committed Mar 2, 2011
1 parent fad301f commit 4d89de3a7c1de84547bfdab2bb26680e9ec65f1c
@@ -97,7 +97,12 @@
nil)
(defn all-complete? [swarm-requests]
- (every? #(% :complete?) swarm-requests))
+ (when (every? #(% :complete?) swarm-requests)
+ (doseq [r swarm-requests]
+ (when (r :distributed?)
+ (log-message "Received sevak response on" (r :sevak-name)
+ "for return-q" (return-q (r :__inner_ref)) "with elapsed time" (r :total-time))))
+ true))
(defn disconnect-all [swarm-requests]
(doseq [req swarm-requests]
@@ -21,6 +21,7 @@
(let [request-object (sevak-queue-message-for-return sevak-service args)
return-q-name (request-object :return-queue-name)
proxy-object (register-callback realtime? return-q-name callback-function request-object)]
+ (log-message "Sending request for" sevak-service "with return-q:" return-q-name)
proxy-object))
([realtime? sevak-service args]
(let [request-object (sevak-queue-message-no-return sevak-service args)]
@@ -83,6 +83,8 @@
{:return-q-name return-q :sevak-name sevak-name :sevak-server-pid (process-pid)}
(execute-sevak sevak-name service-handler service-args))]
(when (and return-q (:return service-handler))
+ (log-message "Returning request for" sevak-name "with return-q:" return-q "elapsed time:"
+ (:sevak-time response))
(send-message-no-declare return-q response))))
(defn sevak-request-handling-listener [req-str ack-fn]

0 comments on commit 4d89de3

Please sign in to comment.