graphile / worker

High performance Node.js/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)
http://worker.graphile.org/
MIT License
1.8k stars 100 forks source link

Readiness api endpoint #437

Open purge opened 7 months ago

purge commented 7 months ago

Feature description

worker API that can determine whether worker is up-and-running

Motivating example

when kubernetes is running a pod it has several probes to determine its status (startup, readines, liveness) while I could touch a file on an event handler this would require ephemeral storage on a read-only filesystem.

A useful pro feature could be to allow for an endpoint /readiness which can respond with a 200 when worker is up and running.

Breaking changes

None

Supporting development

I [tick all that apply]:

benjie commented 7 months ago

It's possible to build a system for this based on the eventing system https://github.com/graphile/worker/pull/155 - I've done so for clients before. And yes, this is one of the planned features for Pro; Worker itself will never come with a bundled HTTP server.