class
JoobQ::Queue(T)
- JoobQ::Queue(T)
- Reference
- Object
Overview
The Queue class now focuses solely on queue operations
Included Modules
Defined in:
joobq/queue.crConstructors
Instance Method Summary
- #add(job : String)
- #add(job : T)
-
#add_batch(jobs : Array(T))
Batch add jobs with pipelining for improved performance
-
#add_batch_strings(jobs : Array(String))
Add batch of job strings
- #claim_job(worker_id : String) : String | Nil
- #claim_jobs_batch(worker_id : String, batch_size : Int32 = 5) : Array(String)
-
#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
-
#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
-
#cleanup_jobs_batch_pipelined(worker_id : String, job_ids : Array(String)) : Nil
Batch job cleanup for improved performance
- #clear
- #delete_job(job : String)
- #job_type : String
- #jobs(page_number : Int32 = 1, page_size : Int32 = 200)
- #mark_as_dead(job : String)
- #name : String
- #next_job : String | Nil
- #parse_job(job : String) : T
-
#processing_queue_size : Int64
Get count of jobs currently in processing queue
- #release_job_claim(worker_id : String) : Nil
- #release_job_claims_batch(worker_id : String, job_count : Int32) : Nil
- #retry(job : String)
- #running? : Bool
- #running_workers : Int32
- #size : Int64
- #start
- #status : String
- #stop!
- #store : Store
- #throttle_limit : NamedTuple(limit: Int32, period: Time::Span) | Nil
- #total_workers : Int32
-
#verify_job_removed_from_processing?(job_id : String) : Bool
Verify that a job has been properly removed from processing queue
- #worker_manager : WorkerManager(T)
Instance methods inherited from module JoobQ::BaseQueue
add(job : String)
add,
job_type : String
job_type,
name : String
name,
running_workers : Int32
running_workers,
size : Int64
size,
start
start,
status : String
status,
stop!
stop!,
throttle_limit : NamedTuple(limit: Int32, period: Time::Span) | Nil
throttle_limit,
total_workers : Int32
total_workers
Constructor Detail
Instance Method Detail
Enhanced cleanup for successfully completed jobs IMPORTANT: job_json must be the FULL job JSON string, not just the job ID
Pipelined job cleanup for improved performance IMPORTANT: job_json must be the FULL job JSON string, not just the job ID
Batch job cleanup for improved performance
Verify that a job has been properly removed from processing queue