Koed00 / django-q

A multiprocessing distributed task queue for Django
https://django-q.readthedocs.org
MIT License
1.83k stars 285 forks source link

Admin integration is empty when using redis #715

Open the-mace opened 1 year ago

the-mace commented 1 year ago

Until recently I was using the "orm" connection with my default database in my deployed environments. I recently changed to use the redis connection in deployed environments, so config looks like:

Q_CLUSTER = {
    "name": "myapp",
    "orm": "default" if DEBUG else None,
    'timeout': 30 * 60,
    'retry': 60 * 60,
    'ack_failures': True,
    'max_attempts': 1,
    'catch_up': False,
    'workers': 1,
    'recycle': 50,
    'redis': f"redis://:{os.getenv('REDIS_PASSWORD')}@{os.getenv('REDIS_HOST')}:{os.getenv('REDIS_PORT')}/3" if not DEBUG else None,
}

The tasks are still running (scheduled and otherwise), but the Django admin no longer shows any scheduled, failed or successful tasks and it did when using the orm connection.

Per the docs (https://django-q.readthedocs.io/en/latest/admin.html) I expected the "Queued tasks" to disappear but the other areas exist in the admin but are now empty all the time.

Since it wasnt showing up, I changed back to orm in my deployed environments (took out redis) and now the completed tasks arent showing up there (shows schedule tasks as expected but they dont show up when completed). So it seems like the act of switching to redis from orm changed something?

Any ideas?