Skip to content

Commit

Permalink
Poller time set by dev mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Mar 13, 2016
1 parent a7db70a commit 14402cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cljs/omgnata/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

; NOTE: these don't actually work in prod mode yet
(def server-url (if (get-env :dev) (str (.replace (-> js/document .-location .-href) ":3449" ":8000") "server.php") "server.php"))
(def poller-time (if (get-env :dev) 5 30))

(secretary/set-config! :prefix "#")

Expand Down Expand Up @@ -138,7 +139,7 @@
(ajax-request {:uri server-url
:method :get
:params {:timestamp timestamp
:live_for (if (get-env :dev) 5 30)}
:live_for poller-time}
:with-credentials true
:response-format (json-response-format)
:handler #(put! c %)})
Expand Down

0 comments on commit 14402cd

Please sign in to comment.