Permalink
Browse files

Correction to the last commit: make the ^:dynamic declarations Clojur…

…e 1.2 compatible.
  • Loading branch information...
1 parent faf4df0 commit a5fd8587650f4a7527a8681f037fdf71715cc0f0 @gcv committed Sep 29, 2011
@@ -79,7 +79,7 @@
;;; development server controls
;;; ----------------------------------------------------------------------------
-(defonce ^:dynamic *server* (atom nil))
+(defonce ^{:dynamic true} *server* (atom nil))
(defn start [appengine-app & {:keys [port join?] :or {port 8080, join? false}}]
@@ -7,10 +7,10 @@
com.google.appengine.api.taskqueue.dev.LocalTaskQueue))
-(defonce ^:dynamic *current-app-id* (atom nil))
-(defonce ^:dynamic *current-app-version* (atom nil))
+(defonce ^{:dynamic true} *current-app-id* (atom nil))
+(defonce ^{:dynamic true} *current-app-version* (atom nil))
-(defonce ^:dynamic *current-server-port* (atom nil))
+(defonce ^{:dynamic true} *current-server-port* (atom nil))
(defn make-thread-environment-proxy [& {:keys [user-email user-admin?]}]
@@ -8,7 +8,7 @@
org.apache.commons.io.IOUtils))
-(defonce ^:dynamic *blobstore-service* (atom nil))
+(defonce ^{:dynamic true} *blobstore-service* (atom nil))
(defn get-blobstore-service []
@@ -3,7 +3,7 @@
(:import [com.google.appengine.api.channel ChannelServiceFactory ChannelMessage]))
-(defonce ^:dynamic *channel-service* (atom nil))
+(defonce ^{:dynamic true} *channel-service* (atom nil))
(defrecord ClientStatus [id status])
@@ -26,18 +26,18 @@
;;; helper variables and constants
;;; ----------------------------------------------------------------------------
-(defonce ^:dynamic *datastore-service* (atom nil))
+(defonce ^{:dynamic true} *datastore-service* (atom nil))
-(defonce ^:dynamic *current-transaction* nil)
+(defonce ^{:dynamic true} *current-transaction* nil)
-(defonce ^:dynamic *datastore-read-policy-map*
+(defonce ^{:dynamic true} *datastore-read-policy-map*
{:eventual ReadPolicy$Consistency/EVENTUAL
:strong ReadPolicy$Consistency/STRONG})
-(defonce ^:dynamic *datastore-implicit-transaction-policy-map*
+(defonce ^{:dynamic true} *datastore-implicit-transaction-policy-map*
{:auto ImplicitTransactionManagementPolicy/AUTO
:none ImplicitTransactionManagementPolicy/NONE})
@@ -11,16 +11,16 @@
;;; helpers
;;; ----------------------------------------------------------------------------
-(defonce ^:dynamic *images-service* (atom nil))
+(defonce ^{:dynamic true} *images-service* (atom nil))
-(defonce ^:dynamic *output-formats*
+(defonce ^{:dynamic true} *output-formats*
{:jpg ImagesService$OutputEncoding/JPEG
:jpeg ImagesService$OutputEncoding/JPEG
:png ImagesService$OutputEncoding/PNG})
-;; (defonce ^:dynamic *composite-anchor*
+;; (defonce ^{:dynamic true} *composite-anchor*
;; {:bottom Composite$Anchor/BOTTOM_CENTER
;; :bottom-left Composite$Anchor/BOTTOM_LEFT
;; :bottom-right Composite$Anchor/BOTTOM_RIGHT
@@ -5,7 +5,7 @@
MailService$Message MailService$Attachment]))
-(defonce ^:dynamic *mail-service* (atom nil))
+(defonce ^{:dynamic true} *mail-service* (atom nil))
(defn get-mail-service []
@@ -8,11 +8,11 @@
appengine_magic.services.datastore.EntityProtocol))
-(defonce ^:dynamic *memcache-service* (atom nil))
-(defonce ^:dynamic *namespaced-memcache-services* (atom {}))
+(defonce ^{:dynamic true} *memcache-service* (atom nil))
+(defonce ^{:dynamic true} *namespaced-memcache-services* (atom {}))
-(defonce ^:dynamic *policy-type-map*
+(defonce ^{:dynamic true} *policy-type-map*
{:always MemcacheService$SetPolicy/SET_ALWAYS
:add-if-not-present MemcacheService$SetPolicy/ADD_ONLY_IF_NOT_PRESENT
:replace-only MemcacheService$SetPolicy/REPLACE_ONLY_IF_PRESENT})
@@ -5,11 +5,11 @@
TaskOptions$Builder TaskOptions$Method]))
-(defonce ^:dynamic *default-queue* (atom nil))
-(defonce ^:dynamic *named-queues* (atom {}))
+(defonce ^{:dynamic true} *default-queue* (atom nil))
+(defonce ^{:dynamic true} *named-queues* (atom {}))
-(defonce ^:dynamic *task-http-methods*
+(defonce ^{:dynamic true} *task-http-methods*
{:post TaskOptions$Method/POST
:delete TaskOptions$Method/DELETE
:get TaskOptions$Method/GET
@@ -8,7 +8,7 @@
HTTPRequest
HTTPMethod]))
-(defonce ^:dynamic *urlfetch-service* (atom nil))
+(defonce ^{:dynamic true} *urlfetch-service* (atom nil))
(defn get-urlfetch-service []
(do (when (nil? @*urlfetch-service*)
@@ -2,7 +2,7 @@
(:import [com.google.appengine.api.users User UserService UserServiceFactory]))
-(defonce ^:dynamic *user-service* (atom nil))
+(defonce ^{:dynamic true} *user-service* (atom nil))
(defn get-user-service []
@@ -9,22 +9,22 @@
[com.google.apphosting.api ApiProxy]))
-(def ^:dynamic *memcache-size-units*
- {:bytes LocalMemcacheServiceTestConfig$SizeUnit/BYTES
- :kb LocalMemcacheServiceTestConfig$SizeUnit/KB
- :mb LocalMemcacheServiceTestConfig$SizeUnit/MB})
-
-
-(def ^:dynamic *logging-levels*
- {:all java.util.logging.Level/ALL
- :severe java.util.logging.Level/SEVERE
- :warning java.util.logging.Level/WARNING
- :info java.util.logging.Level/INFO
- :config java.util.logging.Level/CONFIG
- :fine java.util.logging.Level/FINE
- :finer java.util.logging.Level/FINER
- :finest java.util.logging.Level/FINEST
- :off java.util.logging.Level/OFF})
+(def ^{:dynamic true} *memcache-size-units*
+ {:bytes LocalMemcacheServiceTestConfig$SizeUnit/BYTES
+ :kb LocalMemcacheServiceTestConfig$SizeUnit/KB
+ :mb LocalMemcacheServiceTestConfig$SizeUnit/MB})
+
+
+(def ^{:dynamic true} *logging-levels*
+ {:all java.util.logging.Level/ALL
+ :severe java.util.logging.Level/SEVERE
+ :warning java.util.logging.Level/WARNING
+ :info java.util.logging.Level/INFO
+ :config java.util.logging.Level/CONFIG
+ :fine java.util.logging.Level/FINE
+ :finer java.util.logging.Level/FINER
+ :finest java.util.logging.Level/FINEST
+ :off java.util.logging.Level/OFF})
(defn memcache [& {:keys [max-size size-units]}]

0 comments on commit a5fd858

Please sign in to comment.