Closed leventov closed 3 years ago
Good idea. thx
Completion jobs inherit the retention according to the following, in order of priority.
The easiest way of implementing what you're asking appears to be a new config setting on each publish (something like completionRetention*
), so you can pick a different retention for the completion job then replace item 1 above in the assignment priority. It's a bit verbose, but very easy to reason about.
I'll keep brainstorming on a global retention policy specifically for completion jobs that makes it easy to understand for those relying on onComplete()
. What I'm trying to avoid is someone not understanding how retention could potentially be in conflict with onComplete(), since it's possible that a combination of settings could remove jobs from a queue before subscriptions can fetch them.
+1 to flexibility here
I deployed pg boss to a free database and got a row limit warning. Given this is a dev instance, not a huge deal to make it purge more often, but was a bit of a surprise.
=> select name, count(*) from pgboss.archive group by name order by count desc;
name | count
-------------------------------------------+-------
__state__completed____pgboss__cron | 3242
__pgboss__cron | 2524
__state__completed____pgboss__maintenance | 1378
__pgboss__maintenance | 1249
notify-ask | 12
__state__completed__notify-ask | 12
(6 rows)
It would be nice to support retention period for
__state__completed__
jobs different from the default (30 days).