Async report generation on wagoe-jobs, with optional storage and email.
jobs, storage and email are optional companions, so their functions are resolved at call time rather than required: reports works without them, and a request that needs one that is not enabled fails with :missing-dependency.
Async report generation on wagoe-jobs, with optional storage and email. jobs, storage and email are optional companions, so their functions are resolved at call time rather than required: reports works without them, and a request that needs one that is not enabled fails with :missing-dependency.
The job type generate-async enqueues and process-report-job handles.
The job type `generate-async` enqueues and `process-report-job` handles.
(process-report-job {:keys [file-storage email-sender from] :as service}
{:keys [report-id opts]})Handle a :reports/generate job: generate, then store and mail as asked.
service is the ReportServiceProtocol that queued it, carrying
:file-storage, :email-sender and :from when configured. Throws on
failure; the worker records it and retries.
Handle a :reports/generate job: generate, then store and mail as asked. `service` is the ReportServiceProtocol that queued it, carrying `:file-storage`, `:email-sender` and `:from` when configured. Throws on failure; the worker records it and retries.
(queue-report-job! {:keys [job-queue queue-name] :as service} report-id opts)Enqueue registered report report-id on the service's job queue, failing
the request rather than the job when a module the opts need is missing.
Enqueue registered report `report-id` on the service's job queue, failing the request rather than the job when a module the opts need is missing.
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 |