File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,13 @@ the `COUNT` environment variable:
223
223
224
224
$ COUNT=5 bin/resque
225
225
226
+ ### Custom prefix ###
227
+
228
+ When you have multiple apps using the same Redis database it is better to
229
+ use a custom prefix to separate the Resque data:
230
+
231
+ $ PREFIX=my-app-name bin/resque
232
+
226
233
### Forking ###
227
234
228
235
Similarly to the Ruby versions, supported platforms will immediately
@@ -371,3 +378,4 @@ Called after a job has been queued using the `Resque::enqueue` method. Arguments
371
378
* Matt Heath
372
379
* jjfrey
373
380
* scragg0x
381
+ * ruudk
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ if(!empty($COUNT) && $COUNT > 1) {
71
71
$ count = $ COUNT ;
72
72
}
73
73
74
+ $ PREFIX = getenv ('PREFIX ' );
75
+ if (!empty ($ PREFIX )) {
76
+ fwrite (STDOUT , '*** Prefix set to ' .$ PREFIX ."\n" );
77
+ Resque_Redis::prefix ($ PREFIX );
78
+ }
79
+
74
80
if ($ count > 1 ) {
75
81
for ($ i = 0 ; $ i < $ count ; ++$ i ) {
76
82
$ pid = Resque::fork ();
You can’t perform that action at this time.
0 commit comments