Module: Qs::Daemon::ClassMethods

Defined in:
lib/qs/daemon.rb

Instance Method Summary collapse

Instance Method Details

#configurationObject



186
187
188
# File 'lib/qs/daemon.rb', line 186

def configuration
  @configuration ||= Configuration.new
end

#error(&block) ⇒ Object



229
230
231
# File 'lib/qs/daemon.rb', line 229

def error(&block)
  self.configuration.error_procs << block
end

#init(&block) ⇒ Object



225
226
227
# File 'lib/qs/daemon.rb', line 225

def init(&block)
  self.configuration.init_procs << block
end

#logger(*args) ⇒ Object



217
218
219
# File 'lib/qs/daemon.rb', line 217

def logger(*args)
  self.configuration.logger(*args)
end

#name(*args) ⇒ Object



190
191
192
# File 'lib/qs/daemon.rb', line 190

def name(*args)
  self.configuration.name(*args)
end

#num_workers(*args) ⇒ Object Also known as: workers



208
209
210
# File 'lib/qs/daemon.rb', line 208

def num_workers(*args)
  self.configuration.num_workers(*args)
end

#pid_file(*args) ⇒ Object



194
195
196
# File 'lib/qs/daemon.rb', line 194

def pid_file(*args)
  self.configuration.pid_file(*args)
end

#queue(queue) ⇒ Object



233
234
235
# File 'lib/qs/daemon.rb', line 233

def queue(queue)
  self.configuration.queues << queue
end

#queuesObject



237
238
239
# File 'lib/qs/daemon.rb', line 237

def queues
  self.configuration.queues
end

#shutdown_timeout(*args) ⇒ Object



221
222
223
# File 'lib/qs/daemon.rb', line 221

def shutdown_timeout(*args)
  self.configuration.shutdown_timeout(*args)
end

#verbose_logging(*args) ⇒ Object



213
214
215
# File 'lib/qs/daemon.rb', line 213

def verbose_logging(*args)
  self.configuration.verbose_logging(*args)
end

#worker_class(new_worker_class = nil) ⇒ Object



198
199
200
201
# File 'lib/qs/daemon.rb', line 198

def worker_class(new_worker_class = nil)
  self.configuration.worker_class = new_worker_class if !new_worker_class.nil?
  self.configuration.worker_class
end

#worker_params(new_worker_params = nil) ⇒ Object



203
204
205
206
# File 'lib/qs/daemon.rb', line 203

def worker_params(new_worker_params = nil)
  self.configuration.worker_params = new_worker_params if !new_worker_params.nil?
  self.configuration.worker_params
end