capistrano-resque 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +11 -7
- data/lib/capistrano-resque/capistrano_integration.rb +5 -3
- data/lib/capistrano-resque/version.rb +1 -1
- metadata +3 -2
data/Changelog.md
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
# Changes
|
2
|
-
|
3
|
-
Using SIGQUIT to kill processes as they aren't terminating properly.
|
4
|
-
|
5
1
|
# Capistrano Resque
|
6
2
|
|
7
3
|
Basic tasks for putting some Resque in your Cap.
|
@@ -40,13 +36,13 @@ Running cap -vT | grep resque should give you...
|
|
40
36
|
|
41
37
|
```
|
42
38
|
➔ cap -vT | grep resque
|
43
|
-
cap resque:status # Check
|
39
|
+
cap resque:status # Check workers status
|
44
40
|
cap resque:start # Start Resque workers
|
45
41
|
cap resque:stop # Quit running Resque workers
|
46
42
|
cap resque:restart # Restart running Resque workers
|
47
43
|
cap resque:scheduler:restart #
|
48
|
-
cap resque:scheduler:start # Starts
|
49
|
-
cap resque:scheduler:stop # Stops
|
44
|
+
cap resque:scheduler:start # Starts Resque Scheduler with default configs
|
45
|
+
cap resque:scheduler:stop # Stops Resque Scheduler
|
50
46
|
```
|
51
47
|
|
52
48
|
### Restart on deployment
|
@@ -77,6 +73,14 @@ Resque.logger = Logger.new("new_resque_log_file")
|
|
77
73
|
|
78
74
|
The chatter on: https://github.com/defunkt/resque/pull/450 gives more information. If using HEAD of this resque branch doesn't work for you, then pin to v0.0.7 of this project.
|
79
75
|
|
76
|
+
### Contributing
|
77
|
+
|
78
|
+
1. Fork it
|
79
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
80
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
81
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
82
|
+
5. Create new Pull Request
|
83
|
+
|
80
84
|
### License
|
81
85
|
|
82
86
|
Please see the included LICENSE file.
|
@@ -47,7 +47,7 @@ module CapistranoResque
|
|
47
47
|
|
48
48
|
def start_scheduler(pid)
|
49
49
|
"cd #{current_path} && RAILS_ENV=#{rails_env} \
|
50
|
-
PIDFILE=#{pid} BACKGROUND=yes \
|
50
|
+
PIDFILE=#{pid} BACKGROUND=yes VERBOSE=1 \
|
51
51
|
#{fetch(:bundle_cmd, "bundle")} exec rake resque:scheduler"
|
52
52
|
end
|
53
53
|
|
@@ -68,12 +68,14 @@ module CapistranoResque
|
|
68
68
|
for_each_workers do |role, workers|
|
69
69
|
worker_id = 1
|
70
70
|
workers.each_pair do |queue, number_of_workers|
|
71
|
-
|
71
|
+
logger.info "Starting #{number_of_workers} worker(s) with QUEUE: #{queue}"
|
72
|
+
threads = []
|
72
73
|
number_of_workers.times do
|
73
74
|
pid = "./tmp/pids/resque_work_#{worker_id}.pid"
|
74
|
-
run(start_command(queue, pid), :roles => role)
|
75
|
+
threads << Thread.new { run(start_command(queue, pid), :roles => role) }
|
75
76
|
worker_id += 1
|
76
77
|
end
|
78
|
+
threads.each(&:join)
|
77
79
|
end
|
78
80
|
end
|
79
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-resque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -66,6 +66,7 @@ extensions: []
|
|
66
66
|
extra_rdoc_files: []
|
67
67
|
files:
|
68
68
|
- .gitignore
|
69
|
+
- Changelog.md
|
69
70
|
- Gemfile
|
70
71
|
- Gemfile.lock
|
71
72
|
- LICENSE
|