Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

when running in test mode, the sevak/seva computations are eager now

  • Loading branch information...
commit bf4c6c86ad6e36518b52f05b47e106e3271af83b 1 parent c0a73df
@amitrathore authored
View
51 dujure.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Please make sure to configure ~/.clojure.conf or /etc/clojure.conf
+# sample configuration can be found at clojure.conf.sample
+#
+# Note, running this script will:
+# - Run ~/.clojurerc on boot up (if exists)
+# - Add all .jar files within clj_ext (~/.clojure on default)
+# to the classpath
+#
+#
+
+if [ ! -f /etc/clojure.conf -a ! -f /mnt/furtive/clojure.conf -a ! -f ~/.clojure.conf ]; then
+ echo "Error: No config not found at /etc/clojure.conf or ~/.clojure.conf."
+ echo " Please provide one before starting this script."
+ echo " A sample can be found in the emacs-clojure repository named "
+ echo " clojure.conf.sample"
+ exit
+fi
+
+
+# Whether to load the repl or script
+if [ -z "$1" ]; then
+ clj_class=clojure.lang.Repl
+else
+ clj_class=clojure.lang.Script
+fi
+
+echo "FURTIVE_HOME is ${FURTIVE_HOME}"
+echo "FURTIVE_ENV is ${FURTIVE_ENV}"
+echo "SWARMIJI_HOME is ${SWARMIJI_HOME}"
+echo "SWARMIJI_ENV is ${SWARMIJI_ENV}"
+
+furtive_jars="${FURTIVE_HOME}/lib/java"
+swarmiji_jars="${SWARMIJI_HOME}/lib/java"
+furtive_clj="${FURTIVE_HOME}/lib/clojure/capjure/src/:${FURTIVE_HOME}/lib/clojure/conjure/src/:${FURTIVE_HOME}/lib/clojure/clj-record/:${SWARMIJI_HOME}/src/:/Users/amit/workspace/clj-utils/src/"
+furtive_src="${FURTIVE_HOME}/src/"
+
+clj_cp="."
+[ -f /etc/clojure.conf ] && . /etc/clojure.conf
+[ -f /mnt/furtive/clojure.conf ] && . /mnt/furtive/clojure.conf
+[ -f ~/.clojure.conf ] && . ~/.clojure.conf
+[ -f ~/.clojurerc ] && clj_rc=~/.clojurerc
+clj_cp="${clj_cp}:${furtive_jars}/*:${swarmiji_jars}/*:${furtive_src}:${furtive_clj}:${clj_ext}/*"
+
+if [ -n "${clj_lib}" ]; then
+ export LD_LIBRARY_PATH=${clj_lib}:$LD_LIBRARY_PATH
+fi
+
+echo exec java -Xms256m -Xmx512m -server -Dpid=$$ ${clj_opts} -cp ${clj_cp}:${clj} ${clj_wrapper} ${clj_class} ${clj_rc} $*
+exec java -Xms256m -Xmx512m -server -Dpid=$$ ${clj_opts} -cp ${clj_cp}:${clj} ${clj_wrapper} ${clj_class} ${clj_rc} $1 -- $*
2  lib/clojure/clj-utils
@@ -1 +1 @@
-Subproject commit a3cfbb0d0367c1cff001f3d8d3b070b6b74be966
+Subproject commit a034c0a3d125cf94a9a753656c9b4ea6a4d6e9f3
View
12 src/org/runa/swarmiji/client/client_core.clj
@@ -138,6 +138,11 @@
(defn on-local [sevak-service-function & args]
(let [response-with-time (ref {})]
+ (dosync
+ (ref-set response-with-time
+ (simulate-serialized
+ (run-and-measure-timing
+ (apply (:fn sevak-service-function) args)))))
(fn [accessor]
(cond
(= accessor :sevak-name) sevak-service-function
@@ -152,12 +157,7 @@
(= accessor :exception) nil
(= accessor :stacktrace) nil
(= accessor :_inner_ref) @response-with-time
- (= accessor :value) (dosync
- (ref-set response-with-time
- (simulate-serialized
- (run-and-measure-timing
- (apply (:fn sevak-service-function) args))))
- (@response-with-time :response))
+ (= accessor :value) (@response-with-time :response)
:default (throw (Exception. (str "On-local proxy error - unknown message:" accessor)))))))
(defn send-work-report [sevak-name args sevak-time messaging-time return-q sevak-server-pid]
Please sign in to comment.
Something went wrong with that request. Please try again.