Skip to content

Commit 4a95bd1

Browse files
elasticspoonrosa
authored andcommitted
feat: add recurring cleanup job to generator
Its not immediately clear that finished jobs need to be cleaned up or that solid queue has a built in way to do that. This adds a commented out implementation of that recurring behavior to the generator to make is easier for users to learn about the behavior.
1 parent 9bd2a1b commit 4a95bd1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/generators/solid_queue/install/templates/config/recurring.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88
# command: "SoftDeletedRecord.due.delete_all"
99
# priority: 2
1010
# schedule: at 5am every day
11+
#
12+
# Right now, there's no automatic cleanup of finished jobs.
13+
# This reccuring job will clean up jobs older than the
14+
# `clear_finished_jobs_after` period which defaults to 1 day.
15+
# finished_job_cleanup:
16+
# command: "SolidQueue::Job.clear_finished_in_batches"
17+
# schedule: at 2am every day

0 commit comments

Comments
 (0)