Skip to content

Commit afd84de

Browse files
author
Carlos Viglietta
committed
REDIS_BACKEND_DB env variable added
It's enable the possibility of use a different db index on redis backend
1 parent aae1683 commit afd84de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/resque

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ if(empty($QUEUE)) {
3030
}
3131

3232
$REDIS_BACKEND = getenv('REDIS_BACKEND');
33+
$REDIS_BACKEND_DB = getenv('REDIS_BACKEND_DB');
3334
if(!empty($REDIS_BACKEND)) {
34-
Resque::setBackend($REDIS_BACKEND);
35+
if (empty($REDIS_BACKEND_DB))
36+
Resque::setBackend($REDIS_BACKEND);
37+
else
38+
Resque::setBackend($REDIS_BACKEND, $REDIS_BACKEND_DB);
3539
}
3640

3741
$logLevel = 0;

0 commit comments

Comments
 (0)