pub async fn system_cleanup_handler(
job: SystemCleanupCronReminder,
data: ThinData<DefaultAppState>,
ctx: WorkerContext,
) -> Result<(), HandlerError>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 repositoriesctx- Worker context with attempt number and task ID
§Returns
Result<(), HandlerError>- Success or failure of cleanup processing