Koed00 / django-q

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

Strage cache error KeyError: 'cached' #727

Open pursonc opened 1 year ago

pursonc commented 1 year ago

Hi, guys. Every time I run python manage.py qcluster to start the queue. The error will come out. I need you guys to advise. Thanks.

Process Process-1:4:
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/chenpuxin/Code/miPool/mipool_python/env/lib/python3.9/site-packages/django_q/cluster.py", line 384, in monitor
    save_task(task, broker)
  File "/Users/chenpuxin/Code/miPool/mipool_python/env/lib/python3.9/site-packages/django_q/cluster.py", line 468, in save_task
    cached=task["cached"],
KeyError: 'cached'