REDIS_BACKEND_DB env variable added

It's enable the possibility of use a different db index on redis backend
This commit is contained in:
Carlos Viglietta 2013-02-06 12:37:12 -02:00
parent aae168392c
commit afd84de155

View File

@ -30,8 +30,12 @@ if(empty($QUEUE)) {
} }
$REDIS_BACKEND = getenv('REDIS_BACKEND'); $REDIS_BACKEND = getenv('REDIS_BACKEND');
$REDIS_BACKEND_DB = getenv('REDIS_BACKEND_DB');
if(!empty($REDIS_BACKEND)) { if(!empty($REDIS_BACKEND)) {
if (empty($REDIS_BACKEND_DB))
Resque::setBackend($REDIS_BACKEND); Resque::setBackend($REDIS_BACKEND);
else
Resque::setBackend($REDIS_BACKEND, $REDIS_BACKEND_DB);
} }
$logLevel = 0; $logLevel = 0;