maxcountryman / underway

⏳ Durable step functions via Postgres.
Apache License 2.0
72 stars 2 forks source link

use channels to process ready tasks #25

Closed maxcountryman closed 1 month ago

maxcountryman commented 1 month ago

This introduces a trigger which will notify a channel when tasks are inserted or updated in a "pending" state. Workers now listen on this channel and if their queue is named as the one the notification is for begin processing the next task.

Because channel notifications can fail, we retain the polling mechanism only now it's set to a default polling interval of one minute. This can be configured to be shorter or longer as well.

Closes #19