Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

multicast-to-sevaks reflects sevak var changes

  • Loading branch information...
commit da859ae2f815fd859bef18c88b5c9d8160bed553 1 parent f0ab7c6
@amitrathore authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/org/runa/swarmiji/mpi/sevak_proxy.clj
View
8 src/org/runa/swarmiji/mpi/sevak_proxy.clj
@@ -10,6 +10,8 @@
(use 'org.rathore.amit.utils.config)
(use 'org.rathore.amit.utils.rabbitmq)
(use 'org.rathore.amit.medusa.core)
+(use 'clojure.contrib.except)
+(use 'alex-and-georges.debug-repl)
(defn sevak-queue-message-no-return [sevak-service args]
{:sevak-service-name sevak-service
@@ -33,5 +35,7 @@
(send-message-on-queue (queue-sevak-q-name realtime?) request-object)
nil)))
-(defmacro multicast-to-sevak-servers [sevak-name & args]
- `(fanout-message-to-all (sevak-queue-message-no-return (str '~sevak-name) (list ~@args))))
+(defmacro multicast-to-sevak-servers [sevak-var & args]
+ (let [{:keys [name ns] :as meta-inf} (meta (resolve sevak-var))]
+ (if-not meta-inf (throwf "Multicast-to-sevak-servers is unable to resolve %s" sevak-var))
+ `(fanout-message-to-all (sevak-queue-message-no-return ~(ns-qualified-name name ns) (list ~@args)))))
Please sign in to comment.
Something went wrong with that request. Please try again.