esmero / ami

Archipelago Multi Importer. A module of mass ingest made for the masses
GNU Affero General Public License v3.0
2 stars 4 forks source link

Queue Worker can not (of course) set the status of a deleted AMI set #171

Open DiegoPino opened 1 year ago

DiegoPino commented 1 year ago

What?

Well. If you send to background processing and then delete the AMI set even if the queue item is as atomic as possible (means can be processed without the AMI set), setting the status of the AMI set will currently fail and block the queue and the hydroponic (kill it).

Solution

When loading the AMI set to set the status log that the AMI set is no longer present instead of trying to call a method on NULL

DiegoPino commented 1 year ago

Note: I was in the impression I had handled that edge case but a try/catch will not work with a NULL there. See https://github.com/esmero/ami/blob/486cec30e7729377275bbb850d968442314fdea6/src/Plugin/QueueWorker/IngestADOQueueWorker.php#L1123