Skip to content

Commit 0c036a1

Browse files
committed
fix schedule test, update readme with features
1 parent 0ce1925 commit 0c036a1

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,22 @@ type Schedule struct {
135135

136136
- `Start`: The initial time at which the scheduled job should first run.
137137
- `Interval`: The duration between consecutive executions of the scheduled job.
138-
- `MaxCount`: The maximum number of times the job should be executed. A value 0 indicates an indefinite number of repetitions (run forever).
138+
- `MaxCount`: The maximum number of times the job should be executed. A value 0 indicates an indefinite number of repetitions (run forever).
139+
140+
---
141+
142+
# Features
143+
144+
- Insert job batches using the `COPY FROM` postgres feature.
145+
- Panic recovery for all running jobs.
146+
- Error handling by checking last output parameter for error.
147+
- Multiple queuers can be started in different microservices while maintaining job start order and isolation.
148+
- Scheduled and periodic jobs.
149+
- Easy functions to get jobs and workers.
150+
- Retry mechanism for ended jobs which creates a new job with the same parameters.
151+
152+
## Coming soon
153+
154+
- Add a new job in a transaction to rollback if for example step after job insertion fails.
155+
- Helper function to listen for a specific finished job.
156+
- Custom NextInterval functions to address custom needs for scheduling (eg. scheduling with timezone offset)

model/option_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ func TestIsValid(t *testing.T) {
128128
wantErr: true,
129129
},
130130
{
131-
name: "Invalid options with zero MaxCount in Schedule",
131+
name: "Invalid options with negative MaxCount in Schedule",
132132
options: &Options{
133133
Schedule: &Schedule{
134134
Start: time.Now().Add(1 * time.Minute),
135135
Interval: 1 * time.Minute,
136-
MaxCount: 0,
136+
MaxCount: -1,
137137
},
138138
},
139139
wantErr: true,

0 commit comments

Comments
 (0)