chrisboulton/php-resque — Issue #36: json_decode error when REDIS_BACKEND is not localhost
Author: hSATAC
Created: 2012-01-13 09:42:13+00:00
State: open

everything is fine when I didn't set REDIS_BACKEND
but when it came to production, I set REDIS_BACKEND to other machine and bang it exploded.

Here's what I did:
```
export REDIS_BACKEND=queue.mydomain.com:6379
php resque.php
```

And all I got was json_decode error.

I tried to modify lib/Resque.php
```
public static function redis()
{
if(is_null(self::$redis)) {
self::setBackend('localhost:6379');
}

return self::$redis;
}
```
changed it to queue.mydomain.com:6379 and it worked fine.

So I figure that maybe my env var dropped somewhere and crashed my resque?

How to you guys set up REDIS_BACKEND other than localhost?