Liking cljdoc? Tell your friends :D

common-pg-queue.protocols

Protocol definitions for common-pg-queue. Kept separate from the components that implement them so producer.clj and producer-mock.clj can both satisfy the same JobProducer protocol - callers depend on these vars, not on which namespace built the record, so a real Producer and a ProducerMock are truly interchangeable.

Protocol definitions for common-pg-queue. Kept separate from the
components that implement them so producer.clj and producer-mock.clj
can both satisfy the same JobProducer protocol - callers depend on
these vars, not on which namespace built the record, so a real
Producer and a ProducerMock are truly interchangeable.
raw docstring

JobProducercljprotocol

enqueue!clj

(enqueue! self job-type payload)

Enqueues a job for asynchronous processing. job-type is a keyword, payload is a map.

Enqueues a job for asynchronous processing. job-type is a keyword,
payload is a map.

MockJobProducercljprotocol

clear-enqueued-jobsclj

(clear-enqueued-jobs self)

Clears all enqueued jobs.

Clears all enqueued jobs.

get-all-enqueued-jobsclj

(get-all-enqueued-jobs self)

Returns all enqueued jobs organized by type.

Returns all enqueued jobs organized by type.

get-enqueued-jobsclj

(get-enqueued-jobs self job-type)

Returns all enqueued jobs for a specific type.

Returns all enqueued jobs for a specific type.

get-enqueued-jobs-countclj

(get-enqueued-jobs-count self job-type)

Returns the number of enqueued jobs for a specific type.

Returns the number of enqueued jobs for a specific type.

has-enqueued-job?clj

(has-enqueued-job? self job-type payload)

Checks whether a specific job was enqueued for a type.

Checks whether a specific job was enqueued for a type.

MockQueueWorkerManagercljprotocol

clear-processed-jobsclj

(clear-processed-jobs self)

Clears all processed jobs.

Clears all processed jobs.

consume-job!clj

(consume-job! self queue job-type payload)

Simulates synchronous processing of a job on the given queue, calling that queue's handler directly (without a real Postgres/proletarian).

Simulates synchronous processing of a job on the given queue, calling
that queue's handler directly (without a real Postgres/proletarian).

get-all-processed-jobsclj

(get-all-processed-jobs self)

Returns all processed jobs organized by queue.

Returns all processed jobs organized by queue.

get-processed-jobsclj

(get-processed-jobs self queue)

Returns all jobs processed on a specific queue.

Returns all jobs processed on a specific queue.

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