class Conveyor::Configuration

Defined in:

configuration.cr

Instance Method Summary

Instance Method Detail

def concurrency : Int32 #

The number of Conveyor::Belt instances the orchestrator will create, defaulting to the CONVEYOR_CONCURRENCY environment variable or 10 if that isn't set.


[View source]
def concurrency=(concurrency : Int32) #

The number of Conveyor::Belt instances the orchestrator will create, defaulting to the CONVEYOR_CONCURRENCY environment variable or 10 if that isn't set.


[View source]
def max_attempts : Int32 #

The maximum number of times a job will attempt to execute, defaults to the CONVEYOR_JOB_MAX_ATTEMPTS environment variable or 25 if it isn't set.


[View source]
def max_attempts=(max_attempts : Int32) #

The maximum number of times a job will attempt to execute, defaults to the CONVEYOR_JOB_MAX_ATTEMPTS environment variable or 25 if it isn't set.


[View source]
def orphan_check_interval : Time::Span #

Check for orphaned jobs on this interval, defaulting to 10 minutes and also configurable via the CONVEYOR_ORPHAN_CHECK_DURATION_MIN environment variable.

Orphaned jobs are jobs that were fetched from a queue but not closed out properly. This can happen in several circumstances. A few common examples:

  • a job consumes too much memory and is sent a Signal::KILL
  • during deployment, a job takes longer to complete than the deployment orchestrator allows for shutdown

[View source]
def orphan_check_interval=(orphan_check_interval : Time::Span) #

Check for orphaned jobs on this interval, defaulting to 10 minutes and also configurable via the CONVEYOR_ORPHAN_CHECK_DURATION_MIN environment variable.

Orphaned jobs are jobs that were fetched from a queue but not closed out properly. This can happen in several circumstances. A few common examples:

  • a job consumes too much memory and is sent a Signal::KILL
  • during deployment, a job takes longer to complete than the deployment orchestrator allows for shutdown

[View source]
def queues : Array(String) #

The list of queues that Conveyor::Belt instances will fetch jobs from, defaulting to the comma-separated list of queue names in the CONVEYOR_QUEUES environment variable or ["default"] if it is not set.

bin/conveyor # queues will be `["default"]` if unset in code
CONVEYOR_QUEUES=low,medium,high bin/conveyor # queues will be ["low", "medium", "high"] if unset in code

NOTE If you set this in code, it will override the CONVEYOR_QUEUES environment variable.


[View source]
def queues=(queues : Array(String)) #

The list of queues that Conveyor::Belt instances will fetch jobs from, defaulting to the comma-separated list of queue names in the CONVEYOR_QUEUES environment variable or ["default"] if it is not set.

bin/conveyor # queues will be `["default"]` if unset in code
CONVEYOR_QUEUES=low,medium,high bin/conveyor # queues will be ["low", "medium", "high"] if unset in code

NOTE If you set this in code, it will override the CONVEYOR_QUEUES environment variable.


[View source]
def redis : Redis::Client #

The client that Conveyor::Belts will use to connect to Redis, defaults to Redis::Client.from_env("REDIS_URL"). Rather than simply assigning a URL for Redis to connect to, you assign the Redis instance itself.


[View source]
def redis=(redis : Redis::Client) #

The client that Conveyor::Belts will use to connect to Redis, defaults to Redis::Client.from_env("REDIS_URL"). Rather than simply assigning a URL for Redis to connect to, you assign the Redis instance itself.


[View source]