4 ms·
Exactly this! You can have column like "occurs_at" an then filter with "occurs_at < current_timestamp" together with ordering on that column or possibly some pr
by imhoguy 7y ago
Exactly this! You can have column like "occurs_at" an then filter with "occurs_at < current_timestamp" together with ordering on that column or possibly some priority one too to have workers perform these tasks in importance order.
Retries are trivial too - you can have attempts countdown column etc.
Also check NOTIFY/LISTEN which can be used to avoid pooling and wake-up workers efficiently. https://www.postgresql.org/docs/current/sql-notify.html https://www.postgresql.org/docs/current/sql-notify.html