Nextdoor / ndkale

Kale is a python task worker library that supports priority queues on Amazon SQS

Home Page:https://engblog.nextdoor.com/ac4f7886957b

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https://rollbar.com/nextdoor/nextdoor/items/237418/

drewgbarnes opened this issue · comments

We get a ton of these rollbars. Can we get rid of them?

would this just work?:

if message in self._incomplete_messages:

self._incomplete_messages.remove(message)

Maybe. The deeper problem looks like _run_batch and _release_batch are being executed concurrently. _run_batch() sets self._incomplete_messages, then _release_batch() replaces it with empty list. 💣 💥

Shared mutable state sucks.

Fixed in #22