Class: Readymade::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/readymade.rb

Constant Summary collapse

ALLOWED_LOCK_TYPES =
i[until_executing until_executed until_expired until_and_while_executing while_executing].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



32
33
34
35
36
37
# File 'lib/readymade.rb', line 32

def initialize
  @lock_jobs = false
  @lock_type = :until_executed
  @lock_ttl = 1.days
  @locked_queues = [:default]
end

Instance Attribute Details

#lock_jobsObject

Returns the value of attribute lock_jobs.



28
29
30
# File 'lib/readymade.rb', line 28

def lock_jobs
  @lock_jobs
end

#lock_ttlObject

Returns the value of attribute lock_ttl.



28
29
30
# File 'lib/readymade.rb', line 28

def lock_ttl
  @lock_ttl
end

#lock_typeObject

Returns the value of attribute lock_type.



28
29
30
# File 'lib/readymade.rb', line 28

def lock_type
  @lock_type
end

#locked_queuesObject

Returns the value of attribute locked_queues.



28
29
30
# File 'lib/readymade.rb', line 28

def locked_queues
  @locked_queues
end

Instance Method Details

#lock_jobs?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/readymade.rb', line 64

def lock_jobs?
  lock_jobs
end