]> git.ipfire.org Git - pbs.git/commitdiff
logstreams: Don't wait until all messages have been delivered to all consumers
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 14:01:28 +0000 (14:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 14:01:28 +0000 (14:01 +0000)
This will just queue tasks for all new messages and allows us to get
back to processing the next message quicker.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/logstreams.py

index cc77e0f61056f3b95906727cc1f42e1a17c02098..84b337e67a86129073a357cc54d0c8c70c74e032 100644 (file)
@@ -150,8 +150,5 @@ class LogStream(base.Object):
                        self.buffer.append(m)
 
                        # Send the message to all consumers
-                       async with asyncio.TaskGroup() as tasks:
-                               for c in self.consumers:
-                                       tasks.create_task(
-                                               c.message(m),
-                                       )
+                       for c in self.consumers:
+                               self.backend.run_task(c.message, m)