Permalink
Browse files

REDIS_BACKEND_DB env variable added

It's enable the possibility of use a different db index on redis backend
  • Loading branch information...
1 parent aae1683 commit afd84de15577becf5b7636d54cc460a09188335d @charly22 charly22 committed Feb 6, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 bin/resque
View
6 bin/resque
@@ -30,8 +30,12 @@ if(empty($QUEUE)) {
}
$REDIS_BACKEND = getenv('REDIS_BACKEND');
+$REDIS_BACKEND_DB = getenv('REDIS_BACKEND_DB');
if(!empty($REDIS_BACKEND)) {
- Resque::setBackend($REDIS_BACKEND);
+ if (empty($REDIS_BACKEND_DB))
+ Resque::setBackend($REDIS_BACKEND);
+ else
+ Resque::setBackend($REDIS_BACKEND, $REDIS_BACKEND_DB);
}
$logLevel = 0;

0 comments on commit afd84de

Please sign in to comment.