Skip to content

Does redis factory supports sentinel or cluster? #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
charleslxh opened this issue Jan 22, 2018 · 7 comments
Closed

Does redis factory supports sentinel or cluster? #341

charleslxh opened this issue Jan 22, 2018 · 7 comments

Comments

@charleslxh
Copy link

I use SncRedisBundle in symfony, how can I config a snc_redis.client as the enqueue's redis connection driver.

enqueue:
    transport:
         
@charleslxh
Copy link
Author

I saw the enqueue/redis, and it seems not supported sentinel or cluster.

@charleslxh charleslxh changed the title Does redis factory supports *sentinel* or *cluster*? Does redis factory supports sentinel or cluster? Jan 22, 2018
@makasim
Copy link
Member

makasim commented Jan 22, 2018

Passing redis object to connection factory is not possible at the moment. Would you like to send us a PR?

@charleslxh
Copy link
Author

charleslxh commented Jan 23, 2018

Please take a review! @makasim

@makasim
Copy link
Member

makasim commented Feb 15, 2018

This should solve the issue #367 (comment)

@makasim makasim closed this as completed Feb 15, 2018
@makasim
Copy link
Member

makasim commented Feb 15, 2018

# config/service.yaml

services:
     enqueue_redis_client: 
         class: Enqueue\Redis\PRedis
         arguments: ['@snc_redis.client']

enqueue:
  transport:
    redis:
      vendor: custom
      redis: enqueue_redis_client

@pmishev
Copy link

pmishev commented May 20, 2020

Is this still possible to do with the new config structure in 0.10?

@pmishev
Copy link

pmishev commented May 20, 2020

It looks like this has been broken here: php-enqueue/redis@d6d2148#diff-8e8970cea30c8c83bfe7de0e4d4470e4L18 and is now no longer possible to set a Predis\ClientInterface to PRedis.

I can see that RedisConnectionFactory now can accept Enqueue\Redis instance, but it's not possible to pass that either:

I tried doing:

    redis:
        transport:
            dsn: '@enqueue_redis_client'
            connection_factory_class: 'Enqueue\Redis\RedisConnectionFactory'

but I get:
The DSN is invalid. It does not have scheme separator ":".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants