Skip to content

Scheduled jobs with unique #715

@camaeel

Description

@camaeel

I'm dynamically inserting jobs into river with ScheduledAt attribute.

It seems from my tests that when I call:

res, err := riverClient.Insert(ctx,
	SomeArgs{}, &river.InsertOpts{
		ScheduledAt: scheduleTime,
		UniqueOpts: river.UniqueOpts{
			ByPeriod: 12 * time.Minute,
		},
	},
)

twice in a loop, second job is treated as violating uniqueness condition and not created. scheduleTime is (of course) different by more than 12 minutes.

Does "Uniqueness" feature check only created time, and dosen't work well with scheduled?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions