Hacker News new | past | comments | ask | show | jobs | submit | more jeeybee's comments login

PGQueuer provides job queuing, locking, and real-time notifications using PostgreSQL's FOR UPDATE SKIP LOCKED and LISTEN/NOTIFY. It's a minimalist alternative for those already using PostgreSQL, avoiding the need for Redis.

- https://github.com/janbjorge/PGQueuer

disclaimer: Im the auther.


Used Zed for a week or so, loved it! But the lack of mypy / git integrations forced me back to VS-code :'(


I switch between Sublime and Zed all day depending on what task I'm doing, some things it's still not quite as good at as Sublime. The Ruff integration is excellent though, and the good news there is that apparently they're working on a type checker for Ruff's language server.


Yeah, while I'm pretty happy with git in the terminal, I'm eager to see what Zed's take on a git workflow will look like. The inline git blame info is nice, but a UI for committing and push/pulling the repo would be great.


Got a pihole a few years ago, works like a charm. The only annoyance is when you actually look for produces and nearly all links in google are dead due to ads.


Add *.google.com to the blacklist: problem solved.


This was a major factor in getting a Kagi subscription for my wife.


Unsure whats going on, but unable to add links to my question.

- https://github.com/janbjorge/pgqueuer

- https://news.ycombinator.com/item?id=41284703


Hi everyone!

I’m currently enhancing the documentation for my project, PGQueuer.

About PGQueuer: PGQueuer is a minimalist, high-performance job queue library for Python, leveraging PostgreSQL’s LISTEN/NOTIFY for efficient job management. It’s perfect for handling background tasks and managing workflows with simplicity and reliability

https://github.com/janbjorge/pgqueuer


I’ve seen it posted here once or twice before, but it always brings a smile to my face.


Of my head, you could attach a uuid or sequence number to the emitted event. Then based on the uuid or sequence you can let one or the other event consumer pick?

Ex. you have two consumers, if the sequence number is odd, A picks it, if its even B picks.


Great observation, I wrote a little wrongly. What we want ideally is guaranteed delivery to one random free worker. Uuid strategy is better than locking but this could mean that if one worker gets a longer job, all the others on this worker are delayed even if another worker is free.


I think this concept you mentioned would be called sharding? It's kinda required for apache Kafka and others.


Without more logic than this does this mean any workers that are busy or down mean you lose jobs?


We use a garbage collector to error restart if a job is not served within a specified amount of time.


asyncpg clears out any listeners you have setup once a connection is returned to pool. This will lead to 'missed' events. I guess its something of the same story with psycopg?

If event(s) any jobs will be picked up by the next event or by a timer that checks every 30 seconds or so (can be set by the dev.)


At first glans i i see two thins that PgQueuer can. It has native async support, it you can also have sync functions, they will be offloaded to threads via anyio (https://github.com/janbjorge/PgQueuer/blob/99c82c2d661b2ddfc...)

It has a global rate limit, synced via pg notify.


PgQueuer seems pretty similar to Hatchet - both use Postgres, require their own worker processes, both support async. Hatchet seems to be a lot more powerful though: cron, DAG workflows, retries, timeouts, and a UI dashboard.


https://github.com/tktech/chancy is a very early-stage pet project to work around specific issues I keep running into with Celery that has all of this, including a simple plugin-extendable UI with DAG workflow visualization.


I was able to push PqQueuer to 25k jobs a second in my benchmarking script.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: