Do not crash range tasks if celery result backend does not support saving the group's state

This commit is contained in:
David Douard 2019-01-14 12:06:58 +01:00
parent a1ec4437e6
commit e31b61bee1
3 changed files with 13 additions and 4 deletions

View file

@ -48,7 +48,10 @@ def full_github_relister(self, split=None, **lister_args):
promise = group(range_github_lister.s(minv, maxv, **lister_args)
for minv, maxv in ranges)()
self.log.debug('%s OK (spawned %s subtasks)' % (self.name, len(ranges)))
promise.save() # so that we can restore the GroupResult in tests
try:
promise.save() # so that we can restore the GroupResult in tests
except NotImplementedError:
self.log.info('Unable to call save_group with current result backend.')
return promise.id