Liking cljdoc? Tell your friends :D

boundary.reports.shell.jobs-integration

Optional integration with boundary-jobs for async report generation.

This namespace provides async report generation via the jobs module. The jobs module is an OPTIONAL dependency — add it to your deps.edn:

{:deps {org.boundary-app/boundary-jobs {:mvn/version "0.1.0"}}}

If the jobs module is not available, async functions will throw descriptive errors with :type :missing-dependency.

Usage: ;; Queue report for async generation (queue-report-job! report-def {:invoice-id 42})

;; Register report job handler with jobs module (register-report-job-handler! job-registry)

The job handler will:

  • Resolve data via :data-source (if defined)
  • Generate the report bytes
  • Optionally store via boundary-storage (:storage-key in opts)
  • Optionally send an email notification (:notify-email in opts)
Optional integration with boundary-jobs for async report generation.

This namespace provides async report generation via the jobs module.
The jobs module is an OPTIONAL dependency — add it to your deps.edn:

  {:deps {org.boundary-app/boundary-jobs {:mvn/version "0.1.0"}}}

If the jobs module is not available, async functions will throw descriptive
errors with :type :missing-dependency.

Usage:
  ;; Queue report for async generation
  (queue-report-job! report-def {:invoice-id 42})

  ;; Register report job handler with jobs module
  (register-report-job-handler! job-registry)

The job handler will:
  - Resolve data via :data-source (if defined)
  - Generate the report bytes
  - Optionally store via boundary-storage (:storage-key in opts)
  - Optionally send an email notification (:notify-email in opts)
raw docstring

process-report-jobclj

(process-report-job job-args)

Job handler for generating reports.

Called by the jobs module worker pool. Generates the report, optionally stores via boundary-storage, and optionally sends an email notification.

Job args structure: :report-def - ReportDefinition map :opts - Options map (may include :notify-email, :storage-key)

Returns: {:success? true :result {:report-id :k :filename "f.pdf" :bytes N}} {:success? false :error {:message "..." :type "ReportJobError"}}

Job handler for generating reports.

Called by the jobs module worker pool. Generates the report, optionally
stores via boundary-storage, and optionally sends an email notification.

Job args structure:
  :report-def - ReportDefinition map
  :opts       - Options map (may include :notify-email, :storage-key)

Returns:
  {:success? true  :result {:report-id :k :filename "f.pdf" :bytes N}}
  {:success? false :error  {:message "..." :type "ReportJobError"}}
sourceraw docstring

queue-report-job!clj

(queue-report-job! report-def opts)

Queue a report for async generation via boundary-jobs.

Args: report-def - ReportDefinition map (from defreport or plain map) opts - Options forwarded to the job handler: :notify-email - Email address for completion notification :storage-key - Object key for boundary-storage output + any other opts passed to generate

Returns job-id (UUID string).

Throws ex-info with :type :missing-dependency if boundary-jobs is unavailable.

Queue a report for async generation via boundary-jobs.

Args:
  report-def - ReportDefinition map (from defreport or plain map)
  opts       - Options forwarded to the job handler:
               :notify-email - Email address for completion notification
               :storage-key  - Object key for boundary-storage output
               + any other opts passed to generate

Returns job-id (UUID string).

Throws ex-info with :type :missing-dependency if boundary-jobs is unavailable.
sourceraw docstring

register-report-job-handler!clj

(register-report-job-handler! job-registry)

Register the :generate-report job handler with boundary-jobs.

After registration, jobs with :job-type :generate-report will be processed by process-report-job.

Args: job-registry - IJobRegistry instance from boundary-jobs

Returns :generate-report (the job-type keyword).

Throws ex-info with :type :missing-dependency if boundary-jobs is unavailable.

Register the :generate-report job handler with boundary-jobs.

After registration, jobs with :job-type :generate-report will be processed
by process-report-job.

Args:
  job-registry - IJobRegistry instance from boundary-jobs

Returns :generate-report (the job-type keyword).

Throws ex-info with :type :missing-dependency if boundary-jobs is unavailable.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close