Running an application as a service: its scheduled jobs, and the body of code that is the application itself.
Running an application as a service: its scheduled jobs, and the body of code that is the application itself.
(call-with-service {:keys [jobs job-wrapper] :or {job-wrapper identity}} f)Start the scheduler with the given jobs, then call f, returning its value. Options:
:jobs - Map (or seq of pairs) of job name to no-argument function. Schedules come from the :job-schedule config map (see playbook.scheduler); a job with no schedule isn't run. :job-wrapper - Optional function of a job function, returning the function to schedule in its place: for example, to run each job with a database connection (see playbook.db/job-wrapper).
Start the scheduler with the given jobs, then call f, returning its value. Options: :jobs - Map (or seq of pairs) of job name to no-argument function. Schedules come from the :job-schedule config map (see playbook.scheduler); a job with no schedule isn't run. :job-wrapper - Optional function of a job function, returning the function to schedule in its place: for example, to run each job with a database connection (see playbook.db/job-wrapper).
(with-service options & body)Run body as a service with the given options; see call-with-service.
Run body as a service with the given options; see call-with-service.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |