In the cleanup script, after reports are being deleted, the content of the reports folder from S3 storage is listed and compared with the content of reports.json. Any report missing in S3 storage is then removed from reports.json.
But the reports that were only just deleted are not appearing as removed in S3 thus not being deleted from the json file until de next cleanup job runs, leaving some broken links in this time.
In the cleanup script, after reports are being deleted, the content of the
reportsfolder from S3 storage is listed and compared with the content ofreports.json. Any report missing in S3 storage is then removed fromreports.json.But the reports that were only just deleted are not appearing as removed in S3 thus not being deleted from the json file until de next cleanup job runs, leaving some broken links in this time.