Skip to content
Snippets Groups Projects
Commit 34309850 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

make sure that the initialization functions for task/events namespaces is actually optional.

parent ef40043d
Branches
Tags
No related merge requests found
......@@ -31,7 +31,8 @@
(log/info "\tloading events namespace: " events-ns)
(require events-ns)
;; look for `events-init` function in the namespace and call it if it exists
((ns-resolve events-ns 'events-init))))
(when-let [init-fn (ns-resolve events-ns 'events-init)]
(init-fn))))
dorun))
(defn initialize-events!
......
......@@ -27,7 +27,8 @@
(log/info "\tloading tasks namespace: " events-ns)
(require events-ns)
;; look for `task-init` function in the namespace and call it if it exists
((ns-resolve events-ns 'task-init))))
(when-let [init-fn (ns-resolve events-ns 'task-init)]
(init-fn))))
dorun))
(defn start-scheduler!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment