Created
January 3, 2014 03:27
-
-
Save bbbates/8232144 to your computer and use it in GitHub Desktop.
Using leader-guarantee to activate a quartz scheduler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns my-app.scheduler | |
(:use leader-guarantee.core | |
confijulate.core) | |
(:require [clojurewerkz.quartzite.scheduler :as qs])) | |
(defn initialise | |
"The initialisation function for the scheduling system" | |
[] | |
(when (get-cfg :jobs :enable-schedule) ;; Still may want to disable schedule in local dev environment | |
(when-leader "my-app-cluster" | |
(qs/start)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment