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

Process hangs when the remote server is running but doesn't allow you to access. #31

Closed
reterVision opened this issue Feb 28, 2013 · 3 comments

Comments

@reterVision
Copy link

I'm using redis_cache something like this

from redis_cache import get_redis_connection
from rq import Queue

try:
    queue = Queue(connection=get_redis_connection('db'))
    queue.enqueue(some_action, some_data)
except Exception:
    do_something_else(some_data)

I was expecting a ConnectionError or some other exceptions when the remote server refused me to access, but the program just didn't respond anything.

I set the timeout in the caches settings, but it also not work.

"db": {
    "BACKEND": "redis_cache.cache.RedisCache",
        "LOCATION": "127.0.0.1:6379:2",
        "TIMEOUT": 120,
        "OPTIONS": {
            "CLIENT_CLASS": "redis_cache.client.DefaultClient",
        }
    },

Could someone give a clue about this?

@niwinz
Copy link
Collaborator

niwinz commented Feb 28, 2013

Hi!

After django-redis 3.x, the default behavior is the same as memcached backend, to have the previous behavior, see this: https://django-redis.readthedocs.org/en/latest/#extra-settings-added-by-django-redis

If you see if this not works correctly, notify me please.

@niwinz
Copy link
Collaborator

niwinz commented Feb 28, 2013

In any case, get_redis_connection returns a native redis client from "redis-py" package and settings added by django-redis should not have efect over it. :S

@reterVision
Copy link
Author

Hi @niwibe

Thank you for your reply, I think I put this in the wrong place, because the hang problem happens when I do the 'enqueue' action.

Sorry for the trouble again!

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

2 participants