[gnome-music/wip/mschraal/asyncqueue-little-less-spammy-logging] asyncqueue: Reduce log spam
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/asyncqueue-little-less-spammy-logging] asyncqueue: Reduce log spam
- Date: Sun, 24 Apr 2022 10:41:39 +0000 (UTC)
commit fdf52794ddbf7df27d15231bf432a8df88324338
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Apr 24 11:57:52 2022 +0200
asyncqueue: Reduce log spam
gnomemusic/asyncqueue.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/asyncqueue.py b/gnomemusic/asyncqueue.py
index 963842e00..0c72b6dbe 100644
--- a/gnomemusic/asyncqueue.py
+++ b/gnomemusic/asyncqueue.py
@@ -103,6 +103,11 @@ class AsyncQueue(GObject.GObject):
tick)
async_obj.start(*async_task_args[1:])
+ self._log.debug(
+ f"{self._queue_name}: "
+ f"{len(self._async_active_pool)} active task(s)"
+ f"with {len(self._async_pool)} remaining")
+
return GLib.SOURCE_CONTINUE
def _on_async_finished(
@@ -111,10 +116,5 @@ class AsyncQueue(GObject.GObject):
t = (time.time() - tick) * 1000
self._log.debug(f"{self._queue_name}: {t:.2f} ms task")
- a = len(self._async_active_pool)
- self._log.debug(
- f"{self._queue_name}: "
- f"{a} active task(s) of {len(self._async_pool) + a}")
-
obj.disconnect(handler_id)
self._async_active_pool.pop(id(obj))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]