Celery required threads to be gevent patched
In Bliss we patch the Redis client to be gevent friendly. For ewoks we don't use the Redis client directly to wait for workflow results, we use celery. Since Bliss does not let gevent patch threads, we block the gevent loop here:
2023-07-05T11:22:38Z : Greenlet <BlissGreenlet "Greenlet-272" at 0x7f73f402eae0: <bound method greenletDrainer.run of <celery.backends.asynchronous.geventDrainer object at 0x7f73e6b8df70>>> appears to be blocked
Reported by <gevent._gevent_c_tracer.GreenletTracer object at 0x7f740438c7c0>
Blocked Stack (for thread id 0x7f7427bd1740):
File "/home/denolf/dev/celery/celery/backends/asynchronous.py", line 90, in run
self.result_consumer.drain_events(timeout=1)
File "/home/denolf/dev/celery/celery/backends/redis.py", line 161, in drain_events
message = self._pubsub.get_message(timeout=timeout)
File "/users/denolf/virtualenvs/bliss/ubuntu_20_04/lib/python3.9/site-packages/redis/client.py", line 1679, in get_message
if self.subscribed_event.wait(timeout) is True:
File "/users/denolf/virtualenvs/bliss/ubuntu_20_04/lib/python3.9/threading.py", line 581, in wait
signaled = self._cond.wait(timeout)
File "/users/denolf/virtualenvs/bliss/ubuntu_20_04/lib/python3.9/threading.py", line 316, in wait
gotit = waiter.acquire(True, timeout)
This is a real problem because we block scans when we need feedback from workflows.