-
Notifications
You must be signed in to change notification settings - Fork 17
/
resque-lonely_job.gemspec
42 lines (33 loc) · 1.37 KB
/
resque-lonely_job.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/resque-lonely_job/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Jonathan R. Wallace"]
gem.email = ["[email protected]"]
gem.summary = %q{A resque plugin that ensures that only one job for a given queue will be running on any worker at a given time.}
gem.homepage = "http://github.com/wallace/resque-lonely_job"
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "resque-lonely_job"
gem.require_paths = ["lib"]
gem.version = Resque::Plugins::LonelyJob::VERSION
gem.license = "MIT"
gem.add_dependency 'resque', '>= 1.2'
gem.add_development_dependency 'mock_redis'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec', '>= 3.0'
gem.add_development_dependency 'timecop'
gem.description = <<desc
Ensures that for a given queue, only one worker is working on a job at any given time.
Example:
require 'resque/plugins/lonely_job'
class StrictlySerialJob
extend Resque::Plugins::LonelyJob
@queue = :serial_work
def self.perform
# only one at a time in this block, no parallelism allowed for this
# particular queue
end
end
desc
end