Created
December 10, 2009 21:44
-
-
Save drewr/253711 to your computer and use it in GitHub Desktop.
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
(defn make-task [job id] | |
(let [f (fn [context] | |
(try | |
((job :task) job) | |
(catch Exception e | |
(log/error (format "%s %s" (job :name) e)) | |
(mail-error job e))))] | |
(proxy [Task] [] | |
(execute [context] (f context))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment