Stop current process when UpdateWorkerActivity gives a 409 on started
The first call to update_activity
, with started
should prevent running process_element
if the backend gives a 409.
We should have a
except ErrorResponse as e:
if state == ActivityState.started and e.status == 409:
logger.info("Skipping this element because it was already processed.")
return False
return True
then
if self.update_activity() is True:
self.process_element(...)