After upgrading to version 0.12.0 all my new tasks created in the following way:
riverClient.InsertTx(ctx, dbTx,
taskmanager.SomeArgs{
Key: value,
},
&river.InsertOpts{
UniqueOpts: river.UniqueOpts{
ByArgs: true,
},
ScheduledAt: time.Now().Add(time.Second*30),
},
)
Began to be marked in the database with the status "discarded"
This problem was solved only in this way:
func (s *Worker) InsertOpts() river.InsertOpts {
return river.InsertOpts{
UniqueOpts: river.UniqueOpts{
ByArgs: true,
},
}
}
It looks like unique parameters are ignored at the task creation level.
Before updating to version 0.12.0, I rolled out migrations from scratch