abstract class CrystalTask::Storage::Base

Overview

Abstract class that all storage adapters must implement

Direct Known Subclasses

Defined in:

crystal_task/storage/base.cr

Instance Method Summary

Instance Method Detail

abstract def bulk_push(jobs : Array(CrystalTask::Job)) #

[View source]
abstract def bulk_push_scheduled(jobs : Array(CrystalTask::Job), queue_name : String) #

[View source]
abstract def cleanup #

Handle any clean up operations such as removing old stats


[View source]
abstract def dead(queue_name : String) : Array(CrystalTask::Job) #

[View source]
def logger : Logger #

[View source]
abstract def pop(queues : Array(String)) : CrystalTask::Job | Nil #

Push/Pop operations for job processing


[View source]
abstract def pop_queued(job : CrystalTask::Job, queue_name : String) : Int64 #

[View source]
abstract def pop_retries(queue_name : String) : Array(CrystalTask::Job) | Nil #

Push/Pop to your retry queue


[View source]
abstract def pop_scheduled(queue_name : String) : Array(CrystalTask::Job) #

[View source]
abstract def push(job : CrystalTask::Job, queue_name : String) #

[View source]
abstract def push_dead(job : CrystalTask::Job, queue_name : String) #

Push to your dead letters queue


[View source]
abstract def push_queued(job : CrystalTask::Job, queue_name : String) #

Push/Pop operation for when a job is running


[View source]
abstract def push_retries(job : CrystalTask::Job, queue_name : String) #

[View source]
abstract def push_scheduled(job : CrystalTask::Job, queue_name : String, score : Int64) #

[View source]
abstract def queued(queue_name : String) : Array(CrystalTask::Job) #

Return all the queued jobs


[View source]
abstract def read_queues(key : String) : Array(String) #

[View source]
abstract def retries(queue_name : String) : Array(CrystalTask::Job) #

[View source]
abstract def scheduled(queue_name : String) : Array(CrystalTask::Job) #

[View source]
abstract def waiting(queues : Array(String)) : Array(CrystalTask::Job) #

[View source]
abstract def write_queue(queue_name : String, key : String) #

Write/Read operations for queues


[View source]
abstract def write_queues(queues : Array(String), key : String) #

[View source]