Module: Howler
- Defined in:
- lib/howler.rb,
lib/howler/web.rb,
lib/howler/async.rb,
lib/howler/queue.rb,
lib/howler/runner.rb,
lib/howler/worker.rb,
lib/howler/manager.rb,
lib/howler/message.rb,
lib/howler/support/util.rb,
lib/howler/support/config.rb,
lib/howler/support/logger.rb,
lib/howler/support/version.rb,
lib/howler/exceptions/error.rb,
lib/howler/exceptions/retry.rb,
lib/howler/exceptions/failed.rb,
lib/howler/exceptions/notify.rb
Defined Under Namespace
Modules: Async
Classes: Config, Logger, Manager, Message, Queue, Runner, Util, Web, Worker
Constant Summary
collapse
- VERSION =
%W(1 0 0) .join(".")
Class Method Summary
collapse
Class Method Details
.args(args) ⇒ Object
8
9
10
|
# File 'lib/howler.rb', line 8
def self.args(args)
args.to_s.gsub(/^\[|\]$/, '')
end
|
.next(id) ⇒ Object
5
6
7
|
# File 'lib/howler.rb', line 5
def self.next(id)
redis.with {|redis| redis.hincrby("next", id.to_s, 1) }.to_i
end
|
.redis ⇒ Object
11
12
13
|
# File 'lib/howler.rb', line 11
def self.redis
@connection ||= ConnectionPool.new(:timeout => 1, :size => 5) { _redis }
end
|