Skip to content

Commit 3e71f90

Browse files
committed
Add per-environment keys in sample recurring configurations
As suggested in #358
1 parent 9f1d309 commit 3e71f90

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,14 @@ bin/jobs --recurring_schedule_file=config/schedule.yml
380380
The configuration itself looks like this:
381381

382382
```yml
383-
a_periodic_job:
384-
class: MyJob
385-
args: [ 42, { status: "custom_status" } ]
386-
schedule: every second
387-
a_cleanup_task:
388-
command: "DeletedStuff.clear_all"
389-
schedule: every day at 9am
383+
production:
384+
a_periodic_job:
385+
class: MyJob
386+
args: [ 42, { status: "custom_status" } ]
387+
schedule: every second
388+
a_cleanup_task:
389+
command: "DeletedStuff.clear_all"
390+
schedule: every day at 9am
390391
```
391392

392393
Tasks are specified as a hash/dictionary, where the key will be the task's key internally. Each task needs to either have a `class`, which will be the job class to enqueue, or a `command`, which will be eval'ed in the context of a job (`SolidQueue::RecurringJob`) that will be enqueued according to its schedule, in the `solid_queue_recurring` queue.
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# periodic_cleanup:
2-
# class: CleanSoftDeletedRecordsJob
3-
# queue: background
4-
# args: [ 1000, { batch_size: 500 } ]
5-
# schedule: every hour
6-
# periodic_command:
7-
# command: "SoftDeletedRecord.due.delete_all"
8-
# priority: 2
9-
# schedule: at 5am every day
1+
# production:
2+
# periodic_cleanup:
3+
# class: CleanSoftDeletedRecordsJob
4+
# queue: background
5+
# args: [ 1000, { batch_size: 500 } ]
6+
# schedule: every hour
7+
# periodic_command:
8+
# command: "SoftDeletedRecord.due.delete_all"
9+
# priority: 2
10+
# schedule: at 5am every day

0 commit comments

Comments
 (0)