Closed chenwardT closed 8 years ago
Can also occur when getting results of a celery chain.
Note: This was first noticed after changing riot_api
task to use acks_late
.
In [1]: sums = Summoner.objects.filter(region='NA')[10000:20000]
In [2]: from riot_api.wrapper import RiotAPI
In [3]: [RiotAPI.get_match_list(s.summoner_id, region='NA', max_matches=1) for s in sums]
---------------------------------------------------------------------------
WorkerLostError Traceback (most recent call last)
<ipython-input-3-ea52815032dc> in <module>()
----> 1 [RiotAPI.get_match_list(s.summoner_id, region='NA', max_matches=1) for s in sums]
<ipython-input-3-ea52815032dc> in <listcomp>(.0)
----> 1 [RiotAPI.get_match_list(s.summoner_id, region='NA', max_matches=1) for s in sums]
/home/chen/python-projects/lol_stats2/lol_stats2/riot_api/wrapper.py in get_match_list(summoner_id, region, champion_ids, ranked_queues, season, begin_time, end_time, begin_index, end_index, max_matches)
220 return group(chain(RiotAPI.get_match.s(match_id=match_id, region=region),
221 riot_api.s(),
--> 222 store_get_match.s()) for match_id in get_ids_chain().get())()
223
224 @app.task
/home/chen/.virtualenvs/lol_stats2_dev/lib/python3.4/site-packages/celery/result.py in get(self, timeout, propagate, interval, no_ack, follow_parents, EXCEPTION_STATES, PROPAGATE_STATES)
167 interval=interval,
168 on_interval=on_interval,
--> 169 no_ack=no_ack,
170 )
171 if meta:
/home/chen/.virtualenvs/lol_stats2_dev/lib/python3.4/site-packages/celery/backends/base.py in wait_for(self, task_id, timeout, interval, no_ack, on_interval)
219 return meta
220 if on_interval:
--> 221 on_interval()
222 # avoid hammering the CPU checking status.
223 time.sleep(interval)
/home/chen/.virtualenvs/lol_stats2_dev/lib/python3.4/site-packages/celery/result.py in _maybe_reraise_parent_error(self)
179 def _maybe_reraise_parent_error(self):
180 for node in reversed(list(self._parents())):
--> 181 node.maybe_reraise()
182
183 def _parents(self):
/home/chen/.virtualenvs/lol_stats2_dev/lib/python3.4/site-packages/celery/result.py in maybe_reraise(self)
269 def maybe_reraise(self):
270 if self.state in states.PROPAGATE_STATES:
--> 271 raise self.result
272
273 def build_graph(self, intermediate=False, formatter=None):
WorkerLostError: Worker exited prematurely: exitcode 0.
Error sourced to LoLException being unhashable. See https://github.com/pseudonym117/Riot-Watcher/issues/46
Pending something better by author, fixed by: https://github.com/chenwardT/lol_stats2/commit/f03822e4999ce019b26c38c8335fd65ab72107f8
Searches on the subject point to how exceptions are raised, esp. re: using BaseException instead of specific Exceptions. See http://stackoverflow.com/questions/27612584/debugging-celery-workerlosterror-with-exitcode-zero-django-1-5-5-celery-3-1-8
Example output: