I have a typical producer-consumer problem:
Multiple producer applications write job requests to a job-table on a PostgreSQL database.
The job requests have
You might want to look at how queue_classic does it. https://github.com/ryandotsmith/queue_classic
The code is pretty short and easy to understand.