Skip to content
Snippets Groups Projects
Commit cd01bc1d authored by Simon Belak's avatar Simon Belak
Browse files

make predicates return bools

parent 344cd400
No related merge requests found
......@@ -7,15 +7,13 @@
(defonce ^:private running-jobs (atom {}))
(defn done?
(def ^{:arglists '([job])} done?
"Is the computation job done?"
[{:keys [status]}]
(#{:done :error} status))
(comp some? #{:done :error} :status))
(defn running?
(def ^{:arglists '([job])} running?
"Is the computation job still running?"
[{:keys [status]}]
(= :running status))
(comp some? #{:running} :status))
(defn- save-result
[{:keys [id]} payload]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment