Skip to content

Commit

Permalink
earmuffs on dynamic var
Browse files Browse the repository at this point in the history
  • Loading branch information
jarohen committed Nov 27, 2019
1 parent 9c02e6d commit 5a2e725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crux-core/src/crux/tx.clj
Expand Up @@ -97,15 +97,15 @@
(c/->id-buffer new-v)]]}))

(def evict-time-ranges-env-var "CRUX_EVICT_TIME_RANGES")
(def ^:dynamic evict-all-on-legacy-time-ranges? (= (System/getenv evict-time-ranges-env-var) "EVICT_ALL"))
(def ^:dynamic *evict-all-on-legacy-time-ranges?* (= (System/getenv evict-time-ranges-env-var) "EVICT_ALL"))

(defn tx-command-evict [indexer kv object-store snapshot tx-log [op k & legacy-args] transact-time tx-id]
(let [eid (c/new-id k)
history-descending (idx/entity-history snapshot eid)]
{:pre-commit-fn #(cond
(empty? legacy-args) true

(not evict-all-on-legacy-time-ranges?)
(not *evict-all-on-legacy-time-ranges?*)
(throw (IllegalArgumentException. (str "Evict no longer supports time-range parameters. "
"See https://github.com/juxt/crux/pull/438 for more details, and what to do about this message.")))

Expand Down

0 comments on commit 5a2e725

Please sign in to comment.