Skip to content
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

'string indices must be integers, not unicode' #18

Open
adrien-blookup opened this issue Sep 22, 2017 · 0 comments
Open

'string indices must be integers, not unicode' #18

adrien-blookup opened this issue Sep 22, 2017 · 0 comments

Comments

@adrien-blookup
Copy link

Hi,
I'm trying to use celery-redis-sentinel in my django project, but I always get a :

DecodeError at /fr/
('string indices must be integers, not unicode', <function unpickle_backend at 0x7f4c62dac938>, (<class 'celery_redis_sentinel.backend.RedisSentinelBackend'>, ('redis-sentinel://localhost:7000',), {'expires': 86400}))

I have the following setup :

  • 5 redis-servers (1 master and 4 slaves) on 127.0.01:7000-7005
  • 4 sentinels on 127.0.0.1:9000-9003
  • Celery broker is rabbitmq 3.6.9
  • Celery backend is redis 4.0.1
class CeleryConfig:

    CELERY_RESULT_BACKEND = 'redis-sentinel://localhost:9000'
    CELERY_RESULT_BACKEND_TRANSPORT_OPTIONS = {
        'sentinels': [('127.0.0.1', 9000),
                      ('127.0.0.1', 9001),
                      ('127.0.0.1', 9002)],
        'service_name': 'blookup',
        'socket_timeout': 0.1,
    }

celery_redis_sentinel.register()
celery_app = Celery('myapp', backend='redis-sentinel://127.0.0.1:9000')

The error seems to be on backend.py@35 :

 self.sentinels = self.transport_options['sentinels']

self.transport_options value is 'redis-sentinel://localhost:7000' instead of a dict.

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

1 participant