thecartercenter / nemo

NEMO is a mobile data collection and analysis web application.
https://getnemo.org
Apache License 2.0
60 stars 63 forks source link

12506: discard jobs on ActiveJob::DeserializationError #972

Closed cooperka closed 8 months ago

cooperka commented 8 months ago

if, for example, a form (or other object) is created and then deleted before its associated background job can run, the background job will loudly fail with a server alert and possibly cause the DJ queue to backup until it's manually deleted.

instead, we should skip the job if its target no longer exists. tested and verified locally with a series of different fail cases.

the event is also logged to Sentry for analytics.

cooperka commented 8 months ago

specs are flappers