heroku-resque-pool 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'resque/tasks'
3
+
4
+ namespace :resque do
5
+
6
+ # resque worker config (not pool related). e.g. hoptoad, rails environment
7
+ task :setup
8
+
9
+ namespace :pool do
10
+ # resque pool config. e.g. after_prefork connection handling
11
+ task :setup
12
+ end
13
+
14
+ desc "Launch a pool of resque workers"
15
+ task :pool => %w[resque:preload resque:setup resque:pool:setup] do
16
+ require 'resque/pool'
17
+ Resque::Pool.run
18
+ end
19
+
20
+ end
@@ -0,0 +1,5 @@
1
+ module Resque
2
+ class Pool
3
+ VERSION = "0.0.0"
4
+ end
5
+ end
@@ -0,0 +1,88 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "RESQUE\-POOL" "1" "June 2012" "RESQUE-POOL 0.4.0.DEV" "RESQUE-POOL"
5
+ .
6
+ .SH "NAME"
7
+ \fBresque\-pool\fR \- resque worker pool management
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBresque\-pool\fR \fIoptions\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ \fBResque\-pool\fR is the best way to manage a group (pool) of resque workers\.
14
+ .
15
+ .P
16
+ When resque\-pool(1) is daemonized the \fBstdout\fR and \fBstderr\fR output streams are redirected to \fBresque\-pool\.stdxxx\.log\fR log files in the \fBlog\fR directory\. Additionally the PID file defaults to \fBresque\-pool\.pid\fR in the \fBtmp/pids\fR directory\.
17
+ .
18
+ .SH "OPTIONS"
19
+ .
20
+ .IP "\(bu" 4
21
+ \fB\-c, \-\-config\fR \fIfile\fR: Uses the configuration specified in the \fIfile\fR provided instead of searching in the current and \fBconfig\fR directories for \fBresque\-pool\.yml\fR\.
22
+ .
23
+ .IP "\(bu" 4
24
+ \fB\-a, \-\-appname\fR \fIname\fR: Specifies the app name to be used for logging and procline\. If not specified, this defaults to the current working directory\.
25
+ .
26
+ .IP "\(bu" 4
27
+ \fB\-d, \-\-daemon\fR: Runs \fBresque\-pool\fR in the background as a daemon process\. This will redirect \fBstdout\fR and \fBstderr\fR to log files and write a PID file\.
28
+ .
29
+ .IP "\(bu" 4
30
+ \fB\-o, \-\-stdout\fR \fIfile\fR: Writes the normal log output to \fIfile\fR instead of printing to the terminal\. When running as a daemon this defaults to the path \fBlog/resque\-pool\.stdout\.log\fR\.
31
+ .
32
+ .IP "\(bu" 4
33
+ \fB\-e, \-\-stderr\fR \fIfile\fR: Writes the standard error output to \fIfile\fR instead of printing to the terminal\. When running as a daemon this defaults to the path \fBlog/resque\-pool\.stderr\.log\fR\.
34
+ .
35
+ .IP "\(bu" 4
36
+ \fB\-\-nosync\fR Allows writes to \fBstdout\fR and \fBstderr\fR to be buffered\.
37
+ .
38
+ .IP "\(bu" 4
39
+ \fB\-p, \-\-pidfile\fR \fIfile\fR: Writes the PID to the \fIfile\fR\. When running as a daemon this defaults to \fBtmp/pids/resque\-pool\.pid\fR\.
40
+ .
41
+ .IP "\(bu" 4
42
+ \fB\-E, \-\-environment\fR \fIname\fR: Specifies the environment \fIname\fR to be set for \fBRAILS_ENV\fR, \fBRACK_ENV\fR and \fBRESQUE_ENV\fR which will be passed on to the pooled resque workers\.
43
+ .
44
+ .IP "\(bu" 4
45
+ \fB\-\-term\-graceful\-wait\fR: Configure TERM signal handling so the master will gracefully request worker shut downs (via \fBQUIT\fR) and wait for the workers to quit before shutting down itself\. This is the same behavior as the \fBQUIT\fR signal\.
46
+ .
47
+ .IP "\(bu" 4
48
+ \fB\-\-term\-graceful\fR: Configure TERM signal handling so the master will gracefully request worker shut downs (via \fBQUIT\fR) but shut itself down immediately\. This the same behavior as the \fBINT\fR signal\.
49
+ .
50
+ .IP "\(bu" 4
51
+ \fB\-\-term\-immediate\fR: Configure TERM signal handling so the master will request imediate worker shut downs (via \fBINT\fR) and shut itself down immediately\. This is the default \fBTERM\fR signal behavior\.
52
+ .
53
+ .IP "" 0
54
+ .
55
+ .SH "HISTORY"
56
+ .
57
+ .TP
58
+ \fBv0\.3\.0\fR
59
+ Support for ruby 1\.9, resque 1\.20\.
60
+ .
61
+ .br
62
+ Added appname for logging\.
63
+ .
64
+ .br
65
+ Minor bugfixes\.
66
+ .
67
+ .TP
68
+ \fBv0\.2\.0\fR
69
+ Support for reloading logs and workers with \fBHUP\fR signal
70
+ .
71
+ .br
72
+ Cleans up PID file on startup
73
+ .
74
+ .br
75
+ Fixed \fB\-c, \-\-config\fR option\.
76
+ .
77
+ .TP
78
+ \fBv0\.1\.0\fR
79
+ \fBresque\-pool\fR command line interface added
80
+ .
81
+ .SH "AUTHOR"
82
+ Nicholas Evans
83
+ .
84
+ .SH "COPYRIGHT"
85
+ Copyright (C) 2010 by Nicholas Evans \fInick@ekenosen\.net\fR, et al\.
86
+ .
87
+ .SH "SEE ALSO"
88
+ resque\-pool\.yml(5)
@@ -0,0 +1,92 @@
1
+ resque-pool(1) -- resque worker pool management
2
+ ================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `resque-pool` [options]
7
+
8
+ ## DESCRIPTION
9
+
10
+ **Resque-pool** is the best way to manage a group (pool) of resque workers.
11
+
12
+ When resque-pool(1) is daemonized the `stdout` and `stderr` output streams
13
+ are redirected to `resque-pool.stdxxx.log` log files in the `log` directory.
14
+ Additionally the PID file defaults to `resque-pool.pid` in the `tmp/pids`
15
+ directory.
16
+
17
+ ## OPTIONS
18
+
19
+ * `-c, --config` <file>:
20
+ Uses the configuration specified in the <file> provided instead of
21
+ searching in the current and `config` directories for `resque-pool.yml`.
22
+
23
+ * `-a, --appname` <name>:
24
+ Specifies the app name to be used for logging and procline. If not
25
+ specified, this defaults to the current working directory.
26
+
27
+ * `-d, --daemon`:
28
+ Runs `resque-pool` in the background as a daemon process. This will
29
+ redirect `stdout` and `stderr` to log files and write a PID file.
30
+
31
+ * `-o, --stdout` <file>:
32
+ Writes the normal log output to <file> instead of printing to the
33
+ terminal. When running as a daemon this defaults to the path
34
+ `log/resque-pool.stdout.log`.
35
+
36
+ * `-e, --stderr` <file>:
37
+ Writes the standard error output to <file> instead of printing to the
38
+ terminal. When running as a daemon this defaults to the path
39
+ `log/resque-pool.stderr.log`.
40
+
41
+ * `--nosync`
42
+ Allows writes to `stdout` and `stderr` to be buffered.
43
+
44
+ * `-p, --pidfile` <file>:
45
+ Writes the PID to the <file>. When running as a daemon this defaults
46
+ to `tmp/pids/resque-pool.pid`.
47
+
48
+ * `-E, --environment` <name>:
49
+ Specifies the environment <name> to be set for `RAILS_ENV`, `RACK_ENV`
50
+ and `RESQUE_ENV` which will be passed on to the pooled resque workers.
51
+
52
+ * `--term-graceful-wait`:
53
+ Configure TERM signal handling so the master will gracefully request worker
54
+ shut downs (via `QUIT`) and wait for the workers to quit before shutting
55
+ down itself. This is the same behavior as the `QUIT` signal.
56
+
57
+ * `--term-graceful`:
58
+ Configure TERM signal handling so the master will gracefully request worker
59
+ shut downs (via `QUIT`) but shut itself down immediately. This the same
60
+ behavior as the `INT` signal.
61
+
62
+ * `--term-immediate`:
63
+ Configure TERM signal handling so the master will request imediate worker
64
+ shut downs (via `INT`) and shut itself down immediately. This is the
65
+ default `TERM` signal behavior.
66
+
67
+ ## HISTORY
68
+
69
+ * `v0.3.0`:
70
+ Support for ruby 1.9, resque 1.20.<br>
71
+ Added appname for logging.<br>
72
+ Minor bugfixes.
73
+
74
+ * `v0.2.0`:
75
+ Support for reloading logs and workers with `HUP` signal<br>
76
+ Cleans up PID file on startup<br>
77
+ Fixed `-c, --config` option.
78
+
79
+ * `v0.1.0`:
80
+ `resque-pool` command line interface added
81
+
82
+ ## AUTHOR
83
+
84
+ Nicholas Evans
85
+
86
+ ## COPYRIGHT
87
+
88
+ Copyright (C) 2010 by Nicholas Evans <nick@ekenosen.net>, et al.
89
+
90
+ ## SEE ALSO
91
+
92
+ resque-pool.yml(5)
@@ -0,0 +1,46 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "RESQUE\-POOL\.YML" "5" "May 2012" "RESQUE-POOL 0.3.0.DEV" "RESQUE-POOL"
5
+ .
6
+ .SH "NAME"
7
+ \fBresque\-pool\.yml\fR \- resque\-pool pool configuration
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBresque\-pool\.yml\fR
11
+ .
12
+ .br
13
+ \fBconfig/resque\-pool\.yml\fR
14
+ .
15
+ .SH "DESCRIPTION"
16
+ resque\-pool(1) reads pool configuration data from \fBresque\-pool\.yml\fR (or the file specified with \fB\-c\fR on the command line)\. The file contains queue\-worker\-count pairs, one per line\. The configuration file supports both using root level defaults as well as environment specific overrides (\fBRACK_ENV\fR, \fBRAILS_ENV\fR, and \fBRESQUE_ENV\fR environment variables can be used to determine environment)\.
17
+ .
18
+ .P
19
+ An example configuration
20
+ .
21
+ .IP "" 4
22
+ .
23
+ .nf
24
+
25
+ foo: 1
26
+ bar: 2
27
+ "foo,bar,baz": 1
28
+
29
+ production:
30
+ "foo,bar,baz": 4
31
+ .
32
+ .fi
33
+ .
34
+ .IP "" 0
35
+ .
36
+ .P
37
+ will create 7 workers in production and 4 in other environment configurations\. The simpler worker definition \fBfoo: 1\fR will create 1 worker for the \fBfoo\fR queue, the more complicated \fBfoo,bar,baz: 1\fR will create 1 worker for the queues \fBfoo\fR, \fBbar\fR and \fBbaz\fR\.
38
+ .
39
+ .SH "AUTHOR"
40
+ Nicholas Evans
41
+ .
42
+ .SH "COPYRIGHT"
43
+ Copyright (C) 2010 by Nicholas Evans \fInick@ekenosen\.net\fR, et al\.
44
+ .
45
+ .SH "SEE ALSO"
46
+ resque\-pool(1)
@@ -0,0 +1,41 @@
1
+ resque-pool.yml(5) -- resque-pool pool configuration
2
+ =====================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `resque-pool.yml`<br>
7
+ `config/resque-pool.yml`
8
+
9
+ ## DESCRIPTION
10
+
11
+ resque-pool(1) reads pool configuration data from `resque-pool.yml` (or
12
+ the file specified with `-c` on the command line). The file contains queue-worker-count pairs, one per line. The configuration file supports both
13
+ using root level defaults as well as environment specific overrides
14
+ (`RACK_ENV`, `RAILS_ENV`, and `RESQUE_ENV` environment variables can be used
15
+ to determine environment).
16
+
17
+ An example configuration
18
+
19
+ foo: 1
20
+ bar: 2
21
+ "foo,bar,baz": 1
22
+
23
+ production:
24
+ "foo,bar,baz": 4
25
+
26
+ will create 7 workers in production and 4 in other environment configurations.
27
+ The simpler worker definition `foo: 1` will create 1 worker for the `foo`
28
+ queue, the more complicated `foo,bar,baz: 1` will create 1 worker for the
29
+ queues `foo`, `bar` and `baz`.
30
+
31
+ ## AUTHOR
32
+
33
+ Nicholas Evans
34
+
35
+ ## COPYRIGHT
36
+
37
+ Copyright (C) 2010 by Nicholas Evans <nick@ekenosen.net>, et al.
38
+
39
+ ## SEE ALSO
40
+
41
+ resque-pool(1)
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: heroku-resque-pool
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - matthew bramfeld
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: resque
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.22'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.22'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.99'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.99'
55
+ - !ruby/object:Gem::Dependency
56
+ name: cucumber
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: aruba
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.4.11
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.4.11
83
+ - !ruby/object:Gem::Dependency
84
+ name: ronn
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mustache
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.99.8
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.99.8
111
+ description: " this is just a version of resque-pool that doesn't break when you
112
+ specify resque's timeout\n"
113
+ email:
114
+ - nick@ekenosen.net
115
+ executables:
116
+ - heroku-resque-pool
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - LICENSE.txt
121
+ - README.md
122
+ - Rakefile
123
+ - bin/heroku-resque-pool
124
+ - lib/resque/pool.rb
125
+ - lib/resque/pool/cli.rb
126
+ - lib/resque/pool/file_or_hash_loader.rb
127
+ - lib/resque/pool/killer.rb
128
+ - lib/resque/pool/logging.rb
129
+ - lib/resque/pool/pooled_worker.rb
130
+ - lib/resque/pool/tasks.rb
131
+ - lib/resque/pool/version.rb
132
+ - man/resque-pool.1
133
+ - man/resque-pool.1.ronn
134
+ - man/resque-pool.yml.5
135
+ - man/resque-pool.yml.5.ronn
136
+ homepage: http://github.com/mbr84/heroku-resque-pool
137
+ licenses: []
138
+ metadata: {}
139
+ post_install_message:
140
+ rdoc_options: []
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '2.0'
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubyforge_project:
155
+ rubygems_version: 2.6.14
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: quickly and easily fork a pool of resque workers
159
+ test_files: []