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.
(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.
(clear-enqueued-jobs self)Clears all enqueued jobs.
Clears all enqueued jobs.
(get-all-enqueued-jobs self)Returns all enqueued jobs organized by type.
Returns all enqueued jobs organized by type.
(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-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? self job-type payload)Checks whether a specific job was enqueued for a type.
Checks whether a specific job was enqueued for a type.
(clear-processed-jobs self)Clears all processed jobs.
Clears all processed jobs.
(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-jobs self)Returns all processed jobs organized by queue.
Returns all processed jobs organized by queue.
(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
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |