Liking cljdoc? Tell your friends :D

dev.skivi.database.core


add-jobclj

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

Add single job to queue.

Add single job to queue.
sourceraw docstring

add-jobsclj

(add-jobs pool job-specs)

Add multiple jobs to queue in transaction.

Add multiple jobs to queue in transaction.
sourceraw docstring

close-poolclj

(close-pool pool)

Close connection pool and release resources.

Close connection pool and release resources.
sourceraw docstring

complete-jobsclj

(complete-jobs pool worker-id job-ids)

Mark jobs as completed and remove from queue.

Mark jobs as completed and remove from queue.
sourceraw docstring

create-poolclj

(create-pool config)

Create HikariCP connection pool from config map.

Create HikariCP connection pool from config map.
sourceraw docstring

execute!clj

(execute! pool sql-map)
(execute! pool sql-map opts)

Execute SQL query with optional retry logic.

Execute SQL query with optional retry logic.
sourceraw docstring

execute-one!clj

(execute-one! pool sql-map)
(execute-one! pool sql-map opts)

Execute SQL query returning single result.

Execute SQL query returning single result.
sourceraw docstring

fail-jobsclj

(fail-jobs pool worker-id job-failures)

Mark jobs as failed with error details.

Mark jobs as failed with error details.
sourceraw docstring

force-unlock-jobsclj

(force-unlock-jobs pool worker-ids)

Clear locks on locked jobs. When worker-ids is provided, restricted to those workers.

Clear locks on locked jobs. When worker-ids is provided, restricted to those workers.
sourceraw docstring

force-unlock-queuesclj

(force-unlock-queues pool queue-names)

Clear locks on job queues. When queue-names is provided, restricted to those queues.

Clear locks on job queues. When queue-names is provided, restricted to those queues.
sourceraw docstring

gc-job-historyclj

(gc-job-history pool)

Remove expired job history records.

Remove expired job history records.
sourceraw docstring

gc-job-queuesclj

(gc-job-queues pool)

Remove empty job queues.

Remove empty job queues.
sourceraw docstring

gc-task-identifiersclj

(gc-task-identifiers pool)
(gc-task-identifiers pool opts)

Remove unused task identifiers.

Remove unused task identifiers.
sourceraw docstring

get-correlation-historyclj

(get-correlation-history pool correlation-id)

Get history records for correlation-id.

Get history records for correlation-id.
sourceraw docstring

get-job-historyclj

(get-job-history pool job-id)

Get history records for job-id.

Get history records for job-id.
sourceraw docstring

get-jobsclj

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

Retrieve and claim available jobs for worker. Records a started history entry per job atomically. Returns jobs with :correlation-id embedded.

Retrieve and claim available jobs for worker. Records a started history entry
per job atomically. Returns jobs with :correlation-id embedded.
sourceraw docstring

get-rate-limitclj

(get-rate-limit pool key)

Retrieve rate limit state by key. Returns nil if not found.

Retrieve rate limit state by key. Returns nil if not found.
sourceraw docstring

health-checkclj

(health-check pool)

Performs a simple health check by executing a basic query. Returns true if the database is accessible, false otherwise.

Performs a simple health check by executing a basic query.
Returns true if the database is accessible, false otherwise.
sourceraw docstring

load-crontab-stateclj

(load-crontab-state pool identifier)

Return last_execution and known_since for identifier, or nil if not found.

Return last_execution and known_since for identifier, or nil if not found.
sourceraw docstring

permanently-fail-jobsclj

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

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

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

query-job-historyclj

(query-job-history pool criteria)

Return job history records matching criteria map.

Return job history records matching criteria map.
sourceraw docstring

record-job-completionclj

(record-job-completion pool
                       job-id
                       worker-id
                       correlation-id
                       execution-time-ms
                       _results)

Record successful job completion.

Record successful job completion.
sourceraw docstring

record-job-failureclj

(record-job-failure pool
                    job-id
                    worker-id
                    correlation-id
                    execution-time-ms
                    error)

Record job failure with error details.

Record job failure with error details.
sourceraw docstring

record-job-startclj

(record-job-start pool job worker-id correlation-id)
(record-job-start pool job worker-id correlation-id retention)

Record job execution start.

Record job execution start.
sourceraw docstring

record-partial-successclj

(record-partial-success pool
                        job-id
                        worker-id
                        correlation-id
                        execution-time-ms
                        partial-results)

Record partial job success with step details.

Record partial job success with step details.
sourceraw docstring

refill-rate-limitsclj

(refill-rate-limits pool)

Reset tokens to capacity for all rate limits whose window has expired. Returns count of limits refilled.

Reset tokens to capacity for all rate limits whose window has expired.
Returns count of limits refilled.
sourceraw docstring

register-rate-limitclj

(register-rate-limit pool key capacity interval)

Register or update a rate limit. Creates a new limit with full capacity, or updates capacity and interval on an existing one (preserving current tokens).

Register or update a rate limit. Creates a new limit with full capacity, or
updates capacity and interval on an existing one (preserving current tokens).
sourceraw docstring

replay-failed-jobsclj

(replay-failed-jobs pool criteria)

Replay failed jobs matching criteria.

Replay failed jobs matching criteria.
sourceraw docstring

reschedule-jobsclj

(reschedule-jobs pool job-ids opts)

Update run-at for jobs.

Update run-at for jobs.
sourceraw docstring

reset-locked-jobsclj

(reset-locked-jobs pool)
(reset-locked-jobs pool opts)

Reset locked jobs exceeding timeout.

Reset locked jobs exceeding timeout.
sourceraw docstring

update-last-execution!clj

(update-last-execution! pool identifier)

Set last_execution = now() for identifier in known_crontabs.

Set last_execution = now() for identifier in known_crontabs.
sourceraw docstring

upsert-crontab!clj

(upsert-crontab! pool identifier)

Insert known_crontabs entry if identifier is not already present.

Insert known_crontabs entry if identifier is not already present.
sourceraw docstring

with-transactionclj

(with-transaction pool f)

Execute f within transaction, passing connection.

Execute f within transaction, passing connection.
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