cog icon indicating copy to clipboard operation
cog copied to clipboard

Tight loop causes redis worker to consume entire CPU while waiting for messages

Open andreasjansson opened this issue 3 years ago • 0 comments

The loop here takes a full CPU while async polling for messages from Redis: https://github.com/replicate/cog/blob/main/python/cog/server/redis_queue.py#L223-L224

Can we do this with a blocking pop instead?

andreasjansson avatar Jun 13 '22 14:06 andreasjansson