Commit e8bf589
committed
bin/resque: add support for connecting with a cluster client
As `bin/resque` currently works, it pulls in the hostname to use from
the environment using `getenv`. The problem with this is that you cannot
pass in an array which is what the underlying Redis library uses[1] to
determine whether it initialises a `Credis_Client` or a `Credit_Cluster`
for the connection.
This solves that by introducing a new environment variable
(`REDIS_CLUSTER_ENABLED`) to determine when it should expand a comma
separated list of hosts to define as a cluster.
[1]: master/lib/Resque/Redis.php#L1281 parent 78a8b4a commit e8bf589
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
0 commit comments