lib/tasque/configuration.rb in tasque-0.1.1 vs lib/tasque/configuration.rb in tasque-0.2.0
- old
+ new
@@ -41,10 +41,13 @@
attr_accessor :worker
attr_accessor :heartbeat
attr_accessor :heartbeat_interval
attr_accessor :heartbeat_payload
attr_accessor :notify
+ attr_accessor :use_mutex
+ attr_accessor :mutex_name
+ attr_accessor :mutex_options
def initialize
self.environment = :development
self.database_file = ::File.expand_path('config/database.yml', Tasque.root)
self.check_interval = 10 # seconds
@@ -52,9 +55,12 @@
self.progress_interval = 5 # seconds
self.heartbeat = false
self.heartbeat_interval = 10 # seconds
self.heartbeat_payload = {}
self.notify = false
+ self.use_mutex = false
+ self.mutex_name = 'tasque_task_pickup'
+ self.mutex_options = {}
end
def database_file=(path)
if File.exists?(path)
@database = YAML.load(File.read(path)) || {}