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:

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.


def self.new #

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


Class Method Detail

def self.default_delay #

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


def self.default_priority #

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


def self.default_time_to_run #

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


Instance Method Detail

def delay : UInt32 #

Accessor for the delay setting.


def delay=(delay) #

Accessor for the delay setting.


def priority : UInt32 #

Accessor for the priority setting.


def priority=(priority) #

Accessor for the priority setting.


def time_to_run : UInt32 #

Accessor for the time_to_run setting.


def time_to_run=(time_to_run) #

Accessor for the time_to_run setting.