File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ $connectionFactory = new RedisConnectionFactory([
107
107
$context = $connectionFactory->createContext();
108
108
```
109
109
110
- * With custom redis instance :
110
+ * With predis and custom [ options ] ( https://github.com/nrk/predis/wiki/Client-Options ) :
111
111
112
112
It gives you more control over vendor specific features.
113
113
@@ -116,10 +116,15 @@ It gives you more control over vendor specific features.
116
116
use Enqueue\Redis\RedisConnectionFactory;
117
117
use Enqueue\Redis\PRedis;
118
118
119
- $config = [];
120
- $options = [];
119
+ $config = [
120
+ 'host' => 'localhost',
121
+ 'port' => 6379,
122
+ 'predis_options' => [
123
+ 'prefix' => 'ns:'
124
+ ]
125
+ ];
121
126
122
- $redis = new PRedis(new \PRedis\Client( $config, $options) );
127
+ $redis = new PRedis($config);
123
128
124
129
$factory = new RedisConnectionFactory($redis);
125
130
```
You can’t perform that action at this time.
0 commit comments