worker-army 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +4 -3
- data/VERSION +1 -1
- data/lib/worker_army/worker.rb +1 -1
- data/worker-army.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a878a579e7e87921fa49e33ce8cd74e59fe8301
|
4
|
+
data.tar.gz: 15c9d919e599781984924e90503f3680485e9093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f25a98dc55a052ab8dda0a248d79ed563a656e584af6abb1b9524ad2637b7f566a31fb9e99607d7d4667700a8c3e864e3bb01a7b89f41e46615fb935c60d0aa
|
7
|
+
data.tar.gz: 6169a0494da5961f82dcc119a9e99b17f96eb8226f390fa4c0de50631d21473f870c5a4dff01479c8d9f95ffc1a6b3b9a2a16c5760b07feed9e56a197e3deb6f
|
data/README.md
CHANGED
@@ -66,7 +66,7 @@ Provide an (optional) URL as the last argument and worker-army will return the j
|
|
66
66
|
|
67
67
|
You can start up a worker with numerous job classes assigned to it with the following:
|
68
68
|
|
69
|
-
$ rake start_worker
|
69
|
+
$ rake start_worker ExampleJob AnotherJob
|
70
70
|
|
71
71
|
## Jobs
|
72
72
|
|
data/Rakefile
CHANGED
@@ -47,10 +47,11 @@ task 'start_example_workers' do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
desc "Start a worker-army worker to execute job classes"
|
50
|
-
task :start_worker, :job_classes do |t
|
51
|
-
|
50
|
+
task :start_worker, :job_classes do |t|
|
51
|
+
ARGV.shift
|
52
|
+
if ARGV and ARGV.size > 0
|
52
53
|
clazzes = []
|
53
|
-
|
54
|
+
ARGV.each do |jc|
|
54
55
|
clazzes << Object.const_get(jc.lstrip.rstrip).new
|
55
56
|
end
|
56
57
|
WorkerArmy::Worker.new(clazzes).process_queue
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/lib/worker_army/worker.rb
CHANGED
@@ -30,7 +30,7 @@ module WorkerArmy
|
|
30
30
|
raise "No job classes set!" if @jobs.nil? or @jobs.size == 0
|
31
31
|
@queue.ping(worker_pid: Process.pid, job_names: @job_names.join(", "), host_name: @host_name,
|
32
32
|
timestamp: Time.now.utc.to_i)
|
33
|
-
@job_names.each {|job| @log.info("Worker #{@host_name}-#{Process.pid} => Queue: queue_#{job
|
33
|
+
@job_names.each {|job| @log.info("Worker #{@host_name}-#{Process.pid} => Queue: queue_#{job}")}
|
34
34
|
@log.info("Worker #{@host_name}-#{Process.pid} => Processed: #{@processed} - Failed: #{@failed}")
|
35
35
|
list, element = @queue.pop(@jobs)
|
36
36
|
if list and element
|
data/worker-army.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: worker-army 0.6.
|
5
|
+
# stub: worker-army 0.6.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "worker-army"
|
9
|
-
s.version = "0.6.
|
9
|
+
s.version = "0.6.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|