capistrano-resque-pool 0.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 51638063c549528be77ba8b92f534f59ff3c7e1a
4
+ data.tar.gz: 5a8ee1f37aea1d523df586534858b1d7b73cc87b
5
+ SHA512:
6
+ metadata.gz: fee44ca8652a801834ad360d2f19868af35787aef010ae668e5c84e4d97545ea8ba0b87d74995d273e0990b105d2cf8a1db7dbda4607cc8533ace7f15e418da2
7
+ data.tar.gz: f73dd491afb8b6fde5544ae9a4cd74f9dd817b98a8dcbd91ff4960b991826ad28fead99ffda477c578daf05c3241ee8a11c8fdf3a15a5b9ddb95bee787b474da
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-resque-pool.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Maxim Abramchuk
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Capistrano::Resque::Pool
2
+
3
+ Capistrano integration for `resque-pool`.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'capistrano-resque-pool'
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install capistrano-resque-pool
18
+
19
+ ## Usage
20
+
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
+
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it ( https://github.com/[my-github-username]/capistrano-resque-pool/fork )
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ # Maintain your gem's version:
6
+ require 'capistrano/resque/pool/version'
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "capistrano-resque-pool"
10
+ spec.version = Capistrano::Resque::Pool::VERSION
11
+ spec.authors = ["Maxim Abramchuk", "Dmitry Zhlobo"]
12
+ spec.email = ["maximabramchuck@gmail.com"]
13
+ spec.summary = %q{Capistrano integration for Resque pool}
14
+ spec.description = %q{Capistrano integration for Resque pool}
15
+ spec.homepage = "https://github.com/datarockets/capistrano-resque-pool"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ %w(bundler rake).each do |dependency|
24
+ spec.add_development_dependency dependency
25
+ end
26
+
27
+ %w(capistrano resque-pool).each do |dependency|
28
+ spec.add_dependency dependency
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ module Capistrano
2
+ module Resque
3
+ module Pool
4
+ VERSION = '0.0.0.1'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,45 @@
1
+ namespace :resque do
2
+ namespace :pool do
3
+ desc 'Start all the workers and queus'
4
+ task :start do
5
+ on roles(workers) do
6
+ within app_path do
7
+ execute :bundle, :exec, 'resque-pool', '--daemon --environment production'
8
+ end
9
+ end
10
+ end
11
+
12
+ desc 'Gracefully shut down workers and shutdown the manager after all workers are done'
13
+ task :stop do
14
+ on roles(workers) do
15
+ execute :kill, "-s QUIT `cat #{pid_path}`"
16
+ end
17
+ end
18
+
19
+ desc 'Gracefully shut down workers and immediately shutdown manager'
20
+ task :stop_immediately do
21
+ on roles(workers) do
22
+ execute :kill, "-s INT `cat #{pid_path}`"
23
+ end
24
+ end
25
+
26
+ desc 'Reload the config file, reload logfiles, restart all workers'
27
+ task :restart do
28
+ on roles(workers) do
29
+ execute :kill, "-s HUP `cat #{pid_path}`"
30
+ end
31
+ end
32
+
33
+ def app_path
34
+ File.join(fetch(:deploy_to), 'current')
35
+ end
36
+
37
+ def pid_path
38
+ File.join(app_path, '/tmp/pids/resque-pool.pid')
39
+ end
40
+
41
+ def workers
42
+ fetch(:resque_server_roles) || :app
43
+ end
44
+ end
45
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-resque-pool
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Maxim Abramchuk
8
+ - Dmitry Zhlobo
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-02-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: capistrano
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: resque-pool
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ description: Capistrano integration for Resque pool
71
+ email:
72
+ - maximabramchuck@gmail.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - capistrano-resque-pool.gemspec
83
+ - lib/capistrano/resque/pool/version.rb
84
+ - lib/capistrano/tasks/capistrano-resque-pool.rake
85
+ homepage: https://github.com/datarockets/capistrano-resque-pool
86
+ licenses:
87
+ - MIT
88
+ metadata: {}
89
+ post_install_message:
90
+ rdoc_options: []
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 2.2.2
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: Capistrano integration for Resque pool
109
+ test_files: []