struct Beanstalk::Job::Settings

Overview

This structure is used to encapsulate the concepts of priority, delay and time to run which are associated with a job when it is put or released to Beanstalk.

Defined in:

beanstalk/job.cr

Constant Summary

DEFAULT_DELAY = 0_u32

Constant for the default delay setting.

DEFAULT_PRIORITY = 1000_u32

Constant for the default priority setting.

DEFAULT_TIME_TO_RUN = 3600_u32

Constant for the default time to run setting (in seconds).

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(priority : UInt32, delay : UInt32 = DEFAULT_DELAY, time_to_run : UInt32 = DEFAULT_TIME_TO_RUN) #

Explicit constructor.


[View source]
def self.new #

Default constructor that creates an instance with default values for the settings.


[View source]

Class Method Detail

def self.default_delay #

Generates a delay setting based on either an environment variable or a constant.


[View source]
def self.default_priority #

Generates a priority setting based on either an environment variable or a constant.


[View source]
def self.default_time_to_run #

Generates a time to run setting based on either an environment variable or a constant.


[View source]

Instance Method Detail

def delay : UInt32 #

Accessor for the delay setting.


[View source]
def delay=(delay : UInt32) #

Accessor for the delay setting.


[View source]
def priority : UInt32 #

Accessor for the priority setting.


[View source]
def priority=(priority : UInt32) #

Accessor for the priority setting.


[View source]
def time_to_run : UInt32 #

Accessor for the time_to_run setting.


[View source]
def time_to_run=(time_to_run : UInt32) #

Accessor for the time_to_run setting.


[View source]