ask/celery — Issue #501: celeryev crashes intermittently with KeyError exception
Author: erikcw
Created: 2011-10-11 16:36:55+00:00
State: open

I'm running celeryev through django-celery (ie ./manage.py celeryev)

Every couple of hours, celeryev crashes/freezes and displays this traceback at the bottom of the screen.

```python
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/home/linx/linx_env/lib/python2.6/site-packages/celery/events/cursesmon.py", line 456, in run
self.display.draw()
File "/home/linx/linx_env/lib/python2.6/site-packages/celery/events/cursesmon.py", line 328, in draw
tasks = self.tasks
File "/home/linx/linx_env/lib/python2.6/site-packages/celery/events/cursesmon.py", line 438, in tasks
return self.state.tasks_by_timestamp()[:self.limit]
File "/home/linx/linx_env/lib/python2.6/site-packages/celery/events/state.py", line 274, in tasks_by_timestamp
return self._sort_tasks_by_time(self.tasks.items()[:limit])
File "/home/linx/linx_env/lib/python2.6/UserDict.py", line 121, in items
return list(self.iteritems())
File "/home/linx/linx_env/lib/python2.6/UserDict.py", line 110, in iteritems
yield (k, self[k])
KeyError: u'4940b521-e0ca-4134-954e-4144b75bb8ac'

```