pub async fn system_cleanup_handler(
job: SystemCleanupCronReminder,
data: Data<ThinData<DefaultAppState>>,
attempt: Attempt,
) -> Result<(), Error>Expand description
Handles periodic queue metadata cleanup jobs.
This function processes stale job metadata by:
- Acquiring a distributed lock to prevent concurrent cleanup
- Iterating through all queue namespaces
- For each queue, finding and removing job IDs older than threshold
- Cleaning up associated data from the
:datahash
§Arguments
job- The cron reminder job triggering the cleanupdata- Application state containing repositoriesattempt- Current attempt number for retry logic
§Returns
Result<(), Error>- Success or failure of cleanup processing