When deleting a job sometimes we get this error

For the silent delete method, we should let this one slide
because it is an expected error that may occur if there are still
events processing.
This commit is contained in:
Elijah DeLee 2021-01-07 15:37:57 -05:00
parent 7e74f823f4
commit 908291dd3c

View File

@ -25,6 +25,11 @@ class Base(Page):
return self.delete()
except (exc.NoContent, exc.NotFound, exc.Forbidden):
pass
except exc.BadRequest as e:
if 'Job has not finished processing events' in e.msg:
pass
else:
raise e
def get_object_role(self, role, by_name=False):
"""Lookup and return a related object role by its role field or name.