struct Beanstalk::Job::Settings
- Beanstalk::Job::Settings
- Struct
- Value
- Object
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.crConstant 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
-
.new(priority : UInt32, delay : UInt32 = DEFAULT_DELAY, time_to_run : UInt32 = DEFAULT_TIME_TO_RUN)
Explicit constructor.
-
.new
Default constructor that creates an instance with default values for the settings.
Class Method Summary
-
.default_delay
Generates a delay setting based on either an environment variable or a constant.
-
.default_priority
Generates a priority setting based on either an environment variable or a constant.
-
.default_time_to_run
Generates a time to run setting based on either an environment variable or a constant.
Instance Method Summary
-
#delay : UInt32
Accessor for the delay setting.
-
#delay=(delay : UInt32)
Accessor for the delay setting.
-
#priority : UInt32
Accessor for the priority setting.
-
#priority=(priority : UInt32)
Accessor for the priority setting.
-
#time_to_run : UInt32
Accessor for the time_to_run setting.
-
#time_to_run=(time_to_run : UInt32)
Accessor for the time_to_run setting.
Constructor Detail
Explicit constructor.
Class Method Detail
Generates a delay setting based on either an environment variable or a constant.
Generates a priority setting based on either an environment variable or a constant.
Generates a time to run setting based on either an environment variable or a constant.