Module: Resque

Defined in:
lib/resque/plugins/heroku_scaler.rb,
lib/resque/plugins/heroku_scaler/config.rb,
lib/resque/plugins/heroku_scaler/resque.rb,
lib/resque/plugins/heroku_scaler/worker.rb,
lib/resque/plugins/heroku_scaler/manager.rb,
lib/resque/plugins/heroku_scaler/version.rb,
lib/resque/plugins/heroku_scaler/manager/local.rb,
lib/resque/plugins/heroku_scaler/manager/heroku.rb

Defined Under Namespace

Modules: Plugins Classes: Worker

Instance Method Summary collapse

Instance Method Details

#infoObject



5
6
7
8
9
# File 'lib/resque/plugins/heroku_scaler/resque.rb', line 5

def info
  info_with_locked = original_info
  info_with_locked[:locked] = Worker.locked.size
  return info_with_locked
end

#lockObject



11
12
13
# File 'lib/resque/plugins/heroku_scaler/resque.rb', line 11

def lock
  Worker.lock
end

#original_infoObject



3
# File 'lib/resque/plugins/heroku_scaler/resque.rb', line 3

alias_method :original_info, :info

#pruneObject



19
20
21
# File 'lib/resque/plugins/heroku_scaler/resque.rb', line 19

def prune
  Worker.prune
end

#unlockObject



15
16
17
# File 'lib/resque/plugins/heroku_scaler/resque.rb', line 15

def unlock
  Worker.unlock
end