Class: Tasque::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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.expand_path('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.mutex_options = {}
end

Instance Attribute Details

#check_intervalObject

Returns the value of attribute check_interval.



38
39
40
# File 'lib/tasque/configuration.rb', line 38

def check_interval
  @check_interval
end

#databaseObject

Returns the value of attribute database.



34
35
36
# File 'lib/tasque/configuration.rb', line 34

def database
  @database
end

#database_fileObject

Returns the value of attribute database_file.



35
36
37
# File 'lib/tasque/configuration.rb', line 35

def database_file
  @database_file
end

#environmentObject

Returns the value of attribute environment.



36
37
38
# File 'lib/tasque/configuration.rb', line 36

def environment
  @environment
end

#heartbeatObject

Returns the value of attribute heartbeat.



42
43
44
# File 'lib/tasque/configuration.rb', line 42

def heartbeat
  @heartbeat
end

#heartbeat_intervalObject

Returns the value of attribute heartbeat_interval.



43
44
45
# File 'lib/tasque/configuration.rb', line 43

def heartbeat_interval
  @heartbeat_interval
end

#heartbeat_payloadObject

Returns the value of attribute heartbeat_payload.



44
45
46
# File 'lib/tasque/configuration.rb', line 44

def heartbeat_payload
  @heartbeat_payload
end

#loggerObject

Returns the value of attribute logger.



37
38
39
# File 'lib/tasque/configuration.rb', line 37

def logger
  @logger
end

#minimum_priorityObject

Returns the value of attribute minimum_priority.



40
41
42
# File 'lib/tasque/configuration.rb', line 40

def minimum_priority
  @minimum_priority
end

#mutex_nameObject

Returns the value of attribute mutex_name.



47
48
49
# File 'lib/tasque/configuration.rb', line 47

def mutex_name
  @mutex_name
end

#mutex_optionsObject

Returns the value of attribute mutex_options.



48
49
50
# File 'lib/tasque/configuration.rb', line 48

def mutex_options
  @mutex_options
end

#notifyObject

Returns the value of attribute notify.



45
46
47
# File 'lib/tasque/configuration.rb', line 45

def notify
  @notify
end

#progress_intervalObject

Returns the value of attribute progress_interval.



39
40
41
# File 'lib/tasque/configuration.rb', line 39

def progress_interval
  @progress_interval
end

#use_mutexObject

Returns the value of attribute use_mutex.



46
47
48
# File 'lib/tasque/configuration.rb', line 46

def use_mutex
  @use_mutex
end

#workerObject

Returns the value of attribute worker.



41
42
43
# File 'lib/tasque/configuration.rb', line 41

def worker
  @worker
end