class

JoobQ::Queue(T)

Inherits JoobQ::BaseQueue / Reference / Object

The Queue class now focuses solely on queue operations

Constructors

new(name : String, total_workers : Int32, throttle_limit : NamedTuple(limit: Int32, period: Time::Span) | Nil = nil)
Source

Instance methods

add(job : String)
Source
add(job : T)
Source
add_batch(jobs : Array(T))

Batch add jobs with pipelining for improved performance

Source
add_batch_strings(jobs : Array(String))

Add batch of job strings

Source
claim_job(worker_id : String) : String | Nil
Source
claim_jobs_batch(worker_id : String, batch_size : Int32 = 5) : Array(String)
Source
cleanup_completed_job_pipelined(worker_id : String, job_json : String) : Nil

Enhanced cleanup for successfully completed jobs IMPORTANT: job_json must be the FULL job JSON string, not just the job ID

Source
cleanup_job_processing_pipelined(worker_id : String, job_json : String) : Nil

Pipelined job cleanup for improved performance IMPORTANT: job_json must be the FULL job JSON string, not just the job ID

Source
cleanup_jobs_batch_pipelined(worker_id : String, job_ids : Array(String)) : Nil

Batch job cleanup for improved performance

Source
clear
Source
delete_job(job : String)
Source
job_type
Source
jobs(page_number : Int32 = 1, page_size : Int32 = 200)
Source
mark_as_dead(job : String)
Source
name
Source
next_job
Source
parse_job(job : String) : T
Source
processing_queue_size

Get count of jobs currently in processing queue

Source
release_job_claim(worker_id : String) : Nil
Source
release_job_claims_batch(worker_id : String, job_count : Int32) : Nil
Source
retry(job : String)
Source
running?
Source
running_workers
Source
size
Source
start
Source
status
Source
stop!
Source
store
Source
throttle_limit
Source
total_workers
Source
verify_job_removed_from_processing?(job_id : String) : Bool

Verify that a job has been properly removed from processing queue

Source
worker_manager
Source