add an REST API to trigger the prune trash job
This commit is contained in:
@ -216,7 +216,7 @@ export const createWorker = (connection: ConnectionOptions) =>
|
||||
case GENERATE_PREVIEW_CONTENT_JOB:
|
||||
return generatePreviewContent(job.data)
|
||||
case PRUNE_TRASH_JOB:
|
||||
return pruneTrashJob()
|
||||
return pruneTrashJob(job.data)
|
||||
default:
|
||||
logger.warning(`[queue-processor] unhandled job: ${job.name}`)
|
||||
}
|
||||
@ -251,18 +251,6 @@ const setupCronJobs = async () => {
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
await queue.add(
|
||||
PRUNE_TRASH_JOB,
|
||||
{},
|
||||
{
|
||||
priority: getJobPriority(PRUNE_TRASH_JOB),
|
||||
repeat: {
|
||||
// daily at 3am
|
||||
pattern: '0 3 * * *',
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
|
||||
Reference in New Issue
Block a user