Class: Tasque::Configuration
- Inherits:
-
Object
- Object
- Tasque::Configuration
- Defined in:
- lib/tasque/configuration.rb
Instance Attribute Summary collapse
-
#check_interval ⇒ Object
Returns the value of attribute check_interval.
-
#database ⇒ Object
Returns the value of attribute database.
-
#database_file ⇒ Object
Returns the value of attribute database_file.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#heartbeat ⇒ Object
Returns the value of attribute heartbeat.
-
#heartbeat_interval ⇒ Object
Returns the value of attribute heartbeat_interval.
-
#heartbeat_payload ⇒ Object
Returns the value of attribute heartbeat_payload.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#minimum_priority ⇒ Object
Returns the value of attribute minimum_priority.
-
#mutex_name ⇒ Object
Returns the value of attribute mutex_name.
-
#mutex_options ⇒ Object
Returns the value of attribute mutex_options.
-
#notify ⇒ Object
Returns the value of attribute notify.
-
#progress_interval ⇒ Object
Returns the value of attribute progress_interval.
-
#use_mutex ⇒ Object
Returns the value of attribute use_mutex.
-
#worker ⇒ Object
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/tasque/configuration.rb', line 50 def initialize self.environment = :development self.database_file = ::File.('config/database.yml', Tasque.root) self.check_interval = 10 # seconds self.worker = "default" 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. = {} end |
Instance Attribute Details
#check_interval ⇒ Object
Returns the value of attribute check_interval.
38 39 40 |
# File 'lib/tasque/configuration.rb', line 38 def check_interval @check_interval end |
#database ⇒ Object
Returns the value of attribute database.
34 35 36 |
# File 'lib/tasque/configuration.rb', line 34 def database @database end |
#database_file ⇒ Object
Returns the value of attribute database_file.
35 36 37 |
# File 'lib/tasque/configuration.rb', line 35 def database_file @database_file end |
#environment ⇒ Object
Returns the value of attribute environment.
36 37 38 |
# File 'lib/tasque/configuration.rb', line 36 def environment @environment end |
#heartbeat ⇒ Object
Returns the value of attribute heartbeat.
42 43 44 |
# File 'lib/tasque/configuration.rb', line 42 def heartbeat @heartbeat end |
#heartbeat_interval ⇒ Object
Returns the value of attribute heartbeat_interval.
43 44 45 |
# File 'lib/tasque/configuration.rb', line 43 def heartbeat_interval @heartbeat_interval end |
#heartbeat_payload ⇒ Object
Returns the value of attribute heartbeat_payload.
44 45 46 |
# File 'lib/tasque/configuration.rb', line 44 def heartbeat_payload @heartbeat_payload end |
#logger ⇒ Object
Returns the value of attribute logger.
37 38 39 |
# File 'lib/tasque/configuration.rb', line 37 def logger @logger end |
#minimum_priority ⇒ Object
Returns the value of attribute minimum_priority.
40 41 42 |
# File 'lib/tasque/configuration.rb', line 40 def minimum_priority @minimum_priority end |
#mutex_name ⇒ Object
Returns the value of attribute mutex_name.
47 48 49 |
# File 'lib/tasque/configuration.rb', line 47 def mutex_name @mutex_name end |
#mutex_options ⇒ Object
Returns the value of attribute mutex_options.
48 49 50 |
# File 'lib/tasque/configuration.rb', line 48 def @mutex_options end |
#notify ⇒ Object
Returns the value of attribute notify.
45 46 47 |
# File 'lib/tasque/configuration.rb', line 45 def notify @notify end |
#progress_interval ⇒ Object
Returns the value of attribute progress_interval.
39 40 41 |
# File 'lib/tasque/configuration.rb', line 39 def progress_interval @progress_interval end |
#use_mutex ⇒ Object
Returns the value of attribute use_mutex.
46 47 48 |
# File 'lib/tasque/configuration.rb', line 46 def use_mutex @use_mutex end |
#worker ⇒ Object
Returns the value of attribute worker.
41 42 43 |
# File 'lib/tasque/configuration.rb', line 41 def worker @worker end |