abstract class CrystalTask::Storage::Base
- CrystalTask::Storage::Base
- Reference
- Object
Overview
Abstract class that all storage adapters must implement
Direct Known Subclasses
Defined in:
crystal_task/storage/base.crInstance Method Summary
- #bulk_push(jobs : Array(CrystalTask::Job))
- #bulk_push_scheduled(jobs : Array(CrystalTask::Job), queue_name : String)
-
#cleanup
Handle any clean up operations such as removing old stats
- #dead(queue_name : String) : Array(CrystalTask::Job)
- #logger : Logger
-
#pop(queues : Array(String)) : CrystalTask::Job | Nil
Push/Pop operations for job processing
- #pop_queued(job : CrystalTask::Job, queue_name : String) : Int64
-
#pop_retries(queue_name : String) : Array(CrystalTask::Job) | Nil
Push/Pop to your retry queue
- #pop_scheduled(queue_name : String) : Array(CrystalTask::Job)
- #push(job : CrystalTask::Job, queue_name : String)
-
#push_dead(job : CrystalTask::Job, queue_name : String)
Push to your dead letters queue
-
#push_queued(job : CrystalTask::Job, queue_name : String)
Push/Pop operation for when a job is running
- #push_retries(job : CrystalTask::Job, queue_name : String)
- #push_scheduled(job : CrystalTask::Job, queue_name : String, score : Int64)
-
#queued(queue_name : String) : Array(CrystalTask::Job)
Return all the queued jobs
- #read_queues(key : String) : Array(String)
- #retries(queue_name : String) : Array(CrystalTask::Job)
- #scheduled(queue_name : String) : Array(CrystalTask::Job)
- #waiting(queues : Array(String)) : Array(CrystalTask::Job)
-
#write_queue(queue_name : String, key : String)
Write/Read operations for queues
- #write_queues(queues : Array(String), key : String)
Instance Method Detail
abstract
def bulk_push_scheduled(jobs : Array(CrystalTask::Job), queue_name : String)
#
abstract
def pop(queues : Array(String)) : CrystalTask::Job | Nil
#
Push/Pop operations for job processing
abstract
def pop_retries(queue_name : String) : Array(CrystalTask::Job) | Nil
#
Push/Pop to your retry queue
abstract
def push_dead(job : CrystalTask::Job, queue_name : String)
#
Push to your dead letters queue
abstract
def push_queued(job : CrystalTask::Job, queue_name : String)
#
Push/Pop operation for when a job is running
abstract
def push_scheduled(job : CrystalTask::Job, queue_name : String, score : Int64)
#