proletarian

fuad 2026-03-19T01:44:14.313709Z

Hi there! Is there a recommended way to dynamically pause/unpause workers in a multi-instance scenario? I would like to avoid a push approach (telling each individual instance to stop) in favor of a pull one (each instance consults some shared state that tells them to stop consuming).

msolli 2026-03-19T08:27:45.015799Z

That's an interesting use-case. There is no hook or mechanism at the moment for stopping or pausing the polling threads other than stopping the worker. You could implement the pull approach from "the outside" by having some mechanism that consults the shared state and stops/starts workers based on whatever logic you implement.

💡 1
fuad 2026-03-19T10:06:56.837039Z

interesting! I'll try that out

msolli 2026-03-19T10:20:32.442819Z

I've seen your comment on the o11y/instrumentation issue, btw. I have done some exploratory design, but there is a lot to think about, and little time. 😅

fuad 2026-03-19T11:58:39.534269Z

I'm definitely down to help with some pull requests if we can agree on a particular design. Or just some exploratory prs to validate the idea. We picked up proletarian recently at our company and it's been really helpful!

fuad 2026-03-19T01:45:51.443349Z

My use case is stopping consumers in emergency situations (e.g. an incident). It would need to happen fast (can't wait for a full application deployment) and reliably (e.g. can't expect all instances to be accessible via an ip to respond to a request).

fuad 2026-03-19T01:47:19.853389Z

My instinct would be to set a flag in some shared store (e.g. redis, or even a specific postgres table) and have the workers read from it when polling

fuad 2026-03-19T01:48:04.274349Z

A more hackish solution would be to update jobs in the db to be consumed in the far future, and then reset the dates when consumers need to unpause