resque-scheduler 2.5.3 → 2.5.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of resque-scheduler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -0
- data/README.md +54 -18
- data/lib/resque_scheduler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e0ce99a734298a549762b23f47785be5667966a
|
4
|
+
data.tar.gz: 6afeb5b9d56d492974e546a5f02b07e5a187de29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca01e37f6f95d63381c991e15334886882b1a0ec3808235fc8d4e2b388c2fb27540d5656900e5b65a73b199436d638b393ec02431a198ce338407a7490f2e776
|
7
|
+
data.tar.gz: 84d9c9d293009c89ddbb7362d1741ceef87f74fd31636c1631c7a1ce731eb4fbf118263f92ab2af393dfd3898fb8de6ec94bbf208940ed15213c07104c974442
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -55,13 +55,12 @@ Adding the resque:scheduler rake task:
|
|
55
55
|
require 'resque_scheduler/tasks'
|
56
56
|
```
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
`resque
|
64
|
-
to know.
|
58
|
+
### Rake integration
|
59
|
+
|
60
|
+
By default, `resque-scheduler` depends on the "resque:setup" rake task.
|
61
|
+
Since you probably already have this task, lets just put our
|
62
|
+
configuration there. `resque-scheduler` pretty much needs to know
|
63
|
+
everything `resque` needs to know.
|
65
64
|
|
66
65
|
```ruby
|
67
66
|
# Resque tasks
|
@@ -82,7 +81,7 @@ namespace :resque do
|
|
82
81
|
# When dynamic is set to true, the scheduler process looks for
|
83
82
|
# schedule changes and applies them on the fly.
|
84
83
|
# Note: This feature is only available in >=2.0.0.
|
85
|
-
#Resque::Scheduler.dynamic = true
|
84
|
+
# Resque::Scheduler.dynamic = true
|
86
85
|
|
87
86
|
# The schedule doesn't need to be stored in a YAML, it just needs to
|
88
87
|
# be a hash. YAML is usually the easiest.
|
@@ -98,21 +97,58 @@ namespace :resque do
|
|
98
97
|
end
|
99
98
|
```
|
100
99
|
|
101
|
-
The scheduler
|
102
|
-
|
103
|
-
|
104
|
-
never exits.
|
100
|
+
The scheduler rake task is responsible for both queueing items from the
|
101
|
+
schedule and polling the delayed queue for items ready to be pushed on
|
102
|
+
to the work queues. For obvious reasons, this process never exits.
|
105
103
|
|
106
|
-
|
104
|
+
``` bash
|
105
|
+
rake resque:scheduler
|
106
|
+
```
|
107
107
|
|
108
108
|
or, if you want to load the environment first:
|
109
109
|
|
110
|
-
|
110
|
+
``` bash
|
111
|
+
rake environment resque:scheduler
|
112
|
+
```
|
113
|
+
|
114
|
+
|
115
|
+
### Standalone Executable
|
116
|
+
|
117
|
+
The scheduler may also be run via a standalone `resque-scheduler`
|
118
|
+
executable, which will be available once the gem is installed.
|
119
|
+
|
120
|
+
``` bash
|
121
|
+
# Get some help
|
122
|
+
resque-scheduler --help
|
123
|
+
```
|
124
|
+
|
125
|
+
The executable accepts options via option flags as well as via
|
126
|
+
[environment variables](#environment-variables).
|
127
|
+
|
128
|
+
### Environment Variables
|
129
|
+
|
130
|
+
Both the Rake task and standalone executable support the following
|
131
|
+
environment variables:
|
132
|
+
|
133
|
+
* `APP_NAME` - Application name used in procline (`$0`) (default empty)
|
134
|
+
* `BACKGROUND` - [Run in the background](#running-in-the-background) if
|
135
|
+
non-empty (via `Process.daemon`, if supported) (default `false`)
|
136
|
+
* `DYNAMIC_SCHEDULE` - Enables [dynamic scheduling](#dynamic-schedules)
|
137
|
+
if non-empty (default `false`)
|
138
|
+
* `RAILS_ENV` - Environment to use in procline (`$0`) (default empty)
|
139
|
+
* `INITIALIZER_PATH` - Path to a Ruby file that will be loaded *before*
|
140
|
+
requiring `resque` and `resque/scheduler` (default empty).
|
141
|
+
* `RESQUE_SCHEDULER_INTERVAL` - Interval in seconds for checking if a
|
142
|
+
scheduled job must run (coerced with `Kernel#Float()`) (default `5`)
|
143
|
+
* `LOGFILE` - Log file name (default empty, meaning `$stdout`)
|
144
|
+
* `LOGFORMAT` - Log output format to use (either `'text'` or `'json'`,
|
145
|
+
default `'text'`)
|
146
|
+
* `PIDFILE` - If non-empty, write process PID to file (default empty)
|
147
|
+
* `QUIET` or `MUTE` - Silence most output if non-empty (equivalent to
|
148
|
+
a level of `Logger::FATAL`, default `false`)
|
149
|
+
* `VERBOSE` - Maximize log verbosity if non-empty (equivalent to a level
|
150
|
+
of `Logger::DEBUG`, default `false`)
|
111
151
|
|
112
|
-
Supported environment variables are `VERBOSE` and `MUTE`. If either is set to
|
113
|
-
any nonempty value, they will take effect. `VERBOSE` simply dumps more output
|
114
|
-
to stdout. `MUTE` does the opposite and silences all output. `MUTE`
|
115
|
-
supersedes `VERBOSE`.
|
116
152
|
|
117
153
|
### Resque Pool integration
|
118
154
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben VandenBos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.0.
|
244
|
+
rubygems_version: 2.0.3
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: Light weight job scheduling on top of Resque
|