riverqueue / river

Fast and reliable background jobs in Go
https://riverqueue.com
Mozilla Public License 2.0
3.59k stars 94 forks source link

Feature Request: ephemeral jobs #673

Open hypnoglow opened 2 weeks ago

hypnoglow commented 2 weeks ago

Would be nice to have a simple solution for ephemeral jobs that don't need to be stored in the database after completion.

The retention mechanism works well, however, it is global. For important jobs, we want to keep it high. But we also have some jobs that we don't care for after they're completed (mostly cron jobs). And if the inverval is high (e.g. once a minute), the database quickly becomes overloaded with not-very-useful data.

We thought about an option of calling JobDelete manually but it would be much more convenient to have a built-in mechanism.

emilecaron commented 1 week ago

being able to override the retention period by worker would probably do the trick as well