Liking cljdoc? Tell your friends :D

dev.skivi.job-manager.core


add-jobclj

(add-job system task-identifier payload)
(add-job system task-identifier payload opts)

Validates payload then adds single job to queue.

Validates payload then adds single job to queue.
sourceraw docstring

add-jobsclj

(add-jobs system job-specs)

Validates all payloads then adds multiple jobs atomically.

Validates all payloads then adds multiple jobs atomically.
sourceraw docstring

complete-jobsclj

(complete-jobs system worker-id jobs execution-time-ms)

Marks jobs as completed and updates their history records. jobs must be the enriched maps returned by get-jobs.

Marks jobs as completed and updates their history records.
jobs must be the enriched maps returned by get-jobs.
sourceraw docstring

fail-jobsclj

(fail-jobs system worker-id job-errors execution-time-ms)

Records job failures: reschedules with exponential backoff and updates history. job-errors is a sequence of {:job job :error throwable-or-string} maps. jobs must be the enriched maps returned by get-jobs.

Records job failures: reschedules with exponential backoff and updates history.
job-errors is a sequence of {:job job :error throwable-or-string} maps.
jobs must be the enriched maps returned by get-jobs.
sourceraw docstring

force-unlock-jobsclj

(force-unlock-jobs system)
(force-unlock-jobs system worker-ids)

Resets locked_by and locked_at on locked jobs. Unlocks affected queues. Optionally restricted to given worker-ids; nil means all locked jobs.

Resets locked_by and locked_at on locked jobs. Unlocks affected queues.
Optionally restricted to given worker-ids; nil means all locked jobs.
sourceraw docstring

force-unlock-queuesclj

(force-unlock-queues system)
(force-unlock-queues system queue-names)

Clears locked_by and locked_at on job queues. Optionally restricted to given queue-names; nil means all locked queues.

Clears locked_by and locked_at on job queues.
Optionally restricted to given queue-names; nil means all locked queues.
sourceraw docstring

gc-job-historyclj

(gc-job-history system)

Removes expired job history records. Returns count of deleted rows.

Removes expired job history records. Returns count of deleted rows.
sourceraw docstring

gc-job-queuesclj

(gc-job-queues system)

Removes empty, unlocked job queues.

Removes empty, unlocked job queues.
sourceraw docstring

gc-task-identifiersclj

(gc-task-identifiers system)
(gc-task-identifiers system opts)

Removes unused task identifiers. Returns count of deleted rows.

Removes unused task identifiers. Returns count of deleted rows.
sourceraw docstring

get-jobsclj

(get-jobs system worker-id)
(get-jobs system worker-id opts)

Retrieves and locks available jobs for worker-id. Generates a correlation-id per job and records job start in history. Returns jobs with schema/correlation-id-key embedded for use with complete-jobs, fail-jobs, and report-partial-success.

Retrieves and locks available jobs for worker-id. Generates a correlation-id
per job and records job start in history. Returns jobs with schema/correlation-id-key
embedded for use with complete-jobs, fail-jobs, and report-partial-success.
sourceraw docstring

permanently-fail-jobsclj

(permanently-fail-jobs system job-ids reason)

Sets jobs to exhausted status with reason. Unlocks any queues affected.

Sets jobs to exhausted status with reason. Unlocks any queues affected.
sourceraw docstring

refill-rate-limitsclj

(refill-rate-limits system)

Refills tokens for all rate limits whose window has expired.

Refills tokens for all rate limits whose window has expired.
sourceraw docstring

register-rate-limitclj

(register-rate-limit system key capacity interval)

Registers or updates a rate limit. capacity is max tokens per interval. interval is a SQL interval string (e.g. "1 minute").

Registers or updates a rate limit. capacity is max tokens per interval.
interval is a SQL interval string (e.g. "1 minute").
sourceraw docstring

replay-failed-jobsclj

(replay-failed-jobs system criteria)

Creates new jobs from failed history records matching criteria.

Creates new jobs from failed history records matching criteria.
sourceraw docstring

report-partial-successclj

(report-partial-success system worker-id job partial-results execution-time-ms)

Records partial success: reschedules job with exponential backoff and records partial_success in history. job must be the enriched map returned by get-jobs. When attempts = max-attempts, routes to permanent exhaustion instead of rescheduling to prevent the job becoming a zombie (rescheduled but never claimable).

Records partial success: reschedules job with exponential backoff and records
partial_success in history. job must be the enriched map returned by get-jobs.
When attempts = max-attempts, routes to permanent exhaustion instead of rescheduling
to prevent the job becoming a zombie (rescheduled but never claimable).
sourceraw docstring

reschedule-jobsclj

(reschedule-jobs system job-ids opts)

Updates run-at, priority, or max-attempts for jobs.

Updates run-at, priority, or max-attempts for jobs.
sourceraw docstring

reset-locked-jobsclj

(reset-locked-jobs system)
(reset-locked-jobs system opts)

Resets jobs whose locks have exceeded the timeout. Returns count of reset jobs.

Resets jobs whose locks have exceeded the timeout. Returns count of reset jobs.
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