diff options
| -rw-r--r-- | src/admin.clj | 2 | ||||
| -rw-r--r-- | src/scheduled_agent.clj | 4 | ||||
| -rw-r--r-- | src/site.clj | 4 | ||||
| -rwxr-xr-x | src/utils.clj | 3 | ||||
| -rw-r--r-- | static/tests/bugchat.html (renamed from static/test/bugchat.html) | 0 | ||||
| -rw-r--r-- | static/tests/bugchat.js (renamed from static/test/bugchat.js) | 0 |
6 files changed, 6 insertions, 7 deletions
diff --git a/src/admin.clj b/src/admin.clj index e5d3e04..d61105c 100644 --- a/src/admin.clj +++ b/src/admin.clj @@ -62,7 +62,7 @@ LIMIT 1 (first (do-select [fetch-mute-query mute-id]))) (def *active-mutes* - (scheduled-agent (no-args-adaptor fetch-active-mute-map) + (scheduled-agent fetch-active-mute-map *mute-refresh-period-sec* nil)) diff --git a/src/scheduled_agent.clj b/src/scheduled_agent.clj index b1d7fbf..2d1588f 100644 --- a/src/scheduled_agent.clj +++ b/src/scheduled_agent.clj @@ -34,4 +34,6 @@ (defn update! [{func :func data :data}] "Synchronously update contents of agent." - (dosync (ref-set data (func (ensure data)))))
\ No newline at end of file + (let [val (func)] + (dosync + (ref-set data val))))
\ No newline at end of file diff --git a/src/site.clj b/src/site.clj index a6d151d..18fe495 100644 --- a/src/site.clj +++ b/src/site.clj @@ -341,12 +341,12 @@ FROM users u (def *user-info-refresh-period-sec* 300) (def *user-scores* - (scheduled-agent (no-args-adaptor build-score-list) + (scheduled-agent build-score-list *scores-refresh-period-sec* [])) (def *user-info* - (scheduled-agent (no-args-adaptor build-user-info-map) + (scheduled-agent build-user-info-map *user-info-refresh-period-sec* {})) diff --git a/src/utils.clj b/src/utils.clj index 52f8399..b0941f6 100755 --- a/src/utils.clj +++ b/src/utils.clj @@ -56,9 +56,6 @@ (defn nor [& args] (not-any? identity args)) -(defn no-args-adaptor [f] - (fn [& more] (f))) - (defn ms-in-future [ms] (+ ms (System/currentTimeMillis))) diff --git a/static/test/bugchat.html b/static/tests/bugchat.html index 548eb6d..548eb6d 100644 --- a/static/test/bugchat.html +++ b/static/tests/bugchat.html diff --git a/static/test/bugchat.js b/static/tests/bugchat.js index 5d9a7b5..5d9a7b5 100644 --- a/static/test/bugchat.js +++ b/static/tests/bugchat.js |
