capistrano-resque-pool 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -3
- data/capistrano-resque-pool.gemspec +2 -2
- data/lib/capistrano-resque-pool.rb +3 -0
- data/lib/capistrano/resque/pool/version.rb +7 -0
- data/lib/{capistrano-resque-pool → capistrano}/tasks/capistrano-resque-pool.rake +13 -3
- metadata +6 -5
- data/lib/capistrano-resque-pool/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f73cc8a2da3270261c3e005501b9ba6ab136cbd3
|
4
|
+
data.tar.gz: 68100579457c1da70704d14f79b23ffb2908fbee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f203a3671a2f1101baf05c370cedbd9a546e5539b4c93abb2a978a3a05b6f04cdf7319f16e879c48580fa7be3c9cb6b896eab5f7265c2aa2eaf240badb6cec9
|
7
|
+
data.tar.gz: 78bebe514803ca6cc092444b71bb2923418d94805ead33b01fd2e7a11a9ea77d33008bc7453204220b408334c48390ff3616df4611e992f792e36210a2c2695f
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Capistrano::Resque::Pool
|
2
2
|
|
3
|
-
|
3
|
+
Capistrano integration for `resque-pool`.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,7 @@ Add this line to your application's Gemfile:
|
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
13
|
-
$ bundle
|
13
|
+
$ bundle install
|
14
14
|
|
15
15
|
Or install it yourself as:
|
16
16
|
|
@@ -18,7 +18,22 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Start all the workers and queus.
|
22
|
+
|
23
|
+
bundle exec cap production resque:pool:start
|
24
|
+
|
25
|
+
Gracefully shut down workers and shutdown the manager after all workers are done.
|
26
|
+
|
27
|
+
bundle exec cap production resque:pool:stop
|
28
|
+
|
29
|
+
Gracefully shut down workers and immediately shutdown manager.
|
30
|
+
|
31
|
+
bundle exec cap production resque:pool:stop_immediately
|
32
|
+
|
33
|
+
Reload the config file, reload logfiles, restart all workers.
|
34
|
+
|
35
|
+
bundle exec cap production resque:pool:restart
|
36
|
+
|
22
37
|
|
23
38
|
## Contributing
|
24
39
|
|
@@ -3,11 +3,11 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
5
|
# Maintain your gem's version:
|
6
|
-
require 'capistrano
|
6
|
+
require 'capistrano/resque/pool/version'
|
7
7
|
|
8
8
|
Gem::Specification.new do |spec|
|
9
9
|
spec.name = "capistrano-resque-pool"
|
10
|
-
spec.version =
|
10
|
+
spec.version = Capistrano::Resque::Pool::VERSION
|
11
11
|
spec.authors = ["Maxim Abramchuk", "Dmitry Zhlobo"]
|
12
12
|
spec.email = ["maximabramchuck@gmail.com"]
|
13
13
|
spec.summary = %q{Capistrano integration for Resque pool}
|
@@ -1,10 +1,16 @@
|
|
1
1
|
namespace :resque do
|
2
2
|
namespace :pool do
|
3
|
+
def rails_env
|
4
|
+
fetch(:resque_rails_env) ||
|
5
|
+
fetch(:rails_env) || # capistrano-rails doesn't automatically set this (yet),
|
6
|
+
fetch(:stage) # so we need to fall back to the stage.
|
7
|
+
end
|
8
|
+
|
3
9
|
desc 'Start all the workers and queus'
|
4
10
|
task :start do
|
5
11
|
on roles(workers) do
|
6
12
|
within app_path do
|
7
|
-
execute :bundle, :exec, 'resque-pool', "--daemon --environment
|
13
|
+
execute :bundle, :exec, 'resque-pool', "--daemon --environment #{rails_env}"
|
8
14
|
end
|
9
15
|
end
|
10
16
|
end
|
@@ -26,7 +32,11 @@ namespace :resque do
|
|
26
32
|
desc 'Reload the config file, reload logfiles, restart all workers'
|
27
33
|
task :restart do
|
28
34
|
on roles(workers) do
|
29
|
-
|
35
|
+
if test("[ -f #{pid_path} ]")
|
36
|
+
execute :kill, "-s HUP `cat #{pid_path}`"
|
37
|
+
else
|
38
|
+
invoke 'resque:pool:start'
|
39
|
+
end
|
30
40
|
end
|
31
41
|
end
|
32
42
|
|
@@ -42,4 +52,4 @@ namespace :resque do
|
|
42
52
|
fetch(:resque_server_roles) || :app
|
43
53
|
end
|
44
54
|
end
|
45
|
-
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-resque-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Abramchuk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -80,8 +80,9 @@ files:
|
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
82
|
- capistrano-resque-pool.gemspec
|
83
|
-
- lib/capistrano-resque-pool
|
84
|
-
- lib/capistrano
|
83
|
+
- lib/capistrano-resque-pool.rb
|
84
|
+
- lib/capistrano/resque/pool/version.rb
|
85
|
+
- lib/capistrano/tasks/capistrano-resque-pool.rake
|
85
86
|
homepage: https://github.com/datarockets/capistrano-resque-pool
|
86
87
|
licenses:
|
87
88
|
- MIT
|
@@ -102,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
105
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.4.5.1
|
106
107
|
signing_key:
|
107
108
|
specification_version: 4
|
108
109
|
summary: Capistrano integration for Resque pool
|