django-q
django-q copied to clipboard
qmonitor and qinfo not displaying information correctly
The commands python manage.py qmonitor
and python manage.py qinfo
are not displaying information correctly for me. Here's the current output I'm getting from them.
python manage.py qmonitor
python manage.py qinfo
As you can see, qmonitor
appears to show the correct information in the bottom section (number of tasks for queued/success/failures), but no hosts are displayed. Likewise, qinfo
appears to show the correct information for most sections, but Clusters and Workers are both 0
. But at the time of running these commands, I did actually have a django-q
cluster running with 4 workers, which is successfully processing tasks with no issues.
I'm using the orm
broker, with the following config:
$ python manage.py qinfo --config
VERSION: 0.8.1
BULK: 10
CACHE: django
CACHED: False
CATCH_UP: False
COMPRESSED: False
CPU_AFFINITY: 0
DAEMONIZE_WORKERS: True
DISQUE_FASTACK: False
ERROR_REPORTER: {}
GUARD_CYCLE: 0.5
LABEL: Django Q
LOG_LEVEL: INFO
ORM: default
POLL: 0.2
PREFIX: DjangoORM
QSIZE: True
QUEUE_LIMIT: 50
Q_STAT: django_q:DjangoORM:cluster
RECYCLE: 500
REDIS: {}
RETRY: 660
ROLLBAR: {}
SAVE_LIMIT: 10000
SCHEDULER: True
SECRET_KEY: REDACTED
SYNC: False
TESTING: False
TIMEOUT: 600
WORKERS: 4
I use supervisor
to manage my cluster, with the following configuration:
[program:django-q]
command = /var/www/html/venv/bin/python manage.py qcluster --settings=config.settings.production
directory = /var/www/html
stopasgroup = true
I have Django set up with the following cache configuration:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'django',
}
}
Any idea how I can get qmonitor
and qinfo
to actually show all the information that's in the screenshots at http://django-q.readthedocs.io/en/latest/monitor.html?
Same issue here
My config:
BULK: 1
CACHE: default
CACHED: False
CATCH_UP: True
COMPRESSED: False
CPU_AFFINITY: 0
DAEMONIZE_WORKERS: True
DISQUE_FASTACK: False
ERROR_REPORTER: {}
GUARD_CYCLE: 0.5
LABEL: Tasks
LOG_LEVEL: INFO
ORM: default
POLL: 0.2
PREFIX: default
QSIZE: True
QUEUE_LIMIT: 4
Q_STAT: django_q:default:cluster
RECYCLE: 500
REDIS: {}
RETRY: 60
ROLLBAR: {}
SAVE_LIMIT: 250
SCHEDULER: True
SYNC: False
TESTING: False
WORKERS: 2
The Cache:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}
Could be the Cache the issue?
I implemented the memcached on my app and everything works fine now. Definitely a bug with the LocMemCache
Thanks for testing that @karimone.
@Koed00 do you think it will be possible to fix qmonitor
and qinfo
not working correctly with LocMemCache
? I don't think there's anything in the django-q
docs stating that these commands will not work correctly with LocMemCache
so I assume this is just a bug/issue with django-q
rather than some limitation with LocMemCache
?
Have the same issue here as well. Not using any caching backend. Also noticed in the admin interface the django Q section doesn't reflect any of the failed / queued / scheduled tasks.
python3.6 manage.py qinfo --config VERSION: 0.9.4 ACK_FAILURES: False BULK: 10 CACHE: default CACHED: False CATCH_UP: True COMPRESSED: False CPU_AFFINITY: 0 DAEMONIZE_WORKERS: True DISQUE_FASTACK: False ERROR_REPORTER: {} GUARD_CYCLE: 0.5 LABEL: Django Q LOG_LEVEL: INFO ORM: default POLL: 0.2 PREFIX: django-orm QSIZE: True QUEUE_LIMIT: 50 Q_STAT: django_q:django-orm:cluster RECYCLE: 500 REDIS: {} RETRY: 120 ROLLBAR: {} SAVE_LIMIT: 250 SCHEDULER: True SECRET_KEY: BLAH SYNC: False TESTING: False TIMEOUT: 90 WORKERS: 4
I'm having the same issue without any cache setup. It always says 0 clusters and 0 workers.
VERSION: 1.0.2 ACK_FAILURES: False BULK: 10 CACHE: default CACHED: False CATCH_UP: True COMPRESSED: False CPU_AFFINITY: 0 DAEMONIZE_WORKERS: True DISQUE_FASTACK: False ERROR_REPORTER: {} GUARD_CYCLE: 0.5 LABEL: Django Q LOG_LEVEL: INFO ORM: default POLL: 0.2 PREFIX: mytestabc QSIZE: True QUEUE_LIMIT: 50 Q_STAT: django_q:mytestabc:cluster RECYCLE: 500 REDIS: {} RETRY: 60 SAVE_LIMIT: 250 SCHEDULER: True SECRET_KEY: 1234 SYNC: False TESTING: False WORKERS: 1
I'm having the same issue without any cache setup. It always says 0 clusters and 0 workers. ...
It will never work. You need a cache setup on your django project.
https://github.com/Koed00/django-q/issues/516#issuecomment-1311595894
I'm having the same issue without any cache setup. It always says 0 clusters and 0 workers. ...
It will never work. You need a cache setup on your django project.
This shall be in the basic setup README of the project.