Chunks now have several fields with values causing them to be 'locked' or un-editable. But unforseen cases happen where we have in-valid state:
Chunks may belong to a batch that is completed
Chunks may have import/fetch status as in_progress when it's clearly not running.
Suggested resolution
Add a scheduled runner that scans chunks and fixes the following:
If member of a batch, assert the batch is running. Remove batch connection if batch is finished/failed.
If not member of a batch, look for in_progress states and compare it with the last modified date of the chunk. Also look for the fetch/import size to set the status to 'new' or 'failed'
Problem / motivation
Chunks now have several fields with values causing them to be 'locked' or un-editable. But unforseen cases happen where we have in-valid state:
in_progress
when it's clearly not running.Suggested resolution
Add a scheduled runner that scans chunks and fixes the following:
in_progress
states and compare it with the last modified date of the chunk. Also look for the fetch/import size to set the status to 'new' or 'failed'