changeset 3619:32181a45d54b

plugin pubsub cache: use `asDeferred` with `match_cb`
author Goffi <goffi@goffi.org>
date Mon, 02 Aug 2021 21:52:17 +0200
parents 7f503b20597e
children f568f304c982
files sat/plugins/plugin_pubsub_cache.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_pubsub_cache.py	Mon Aug 02 21:52:17 2021 +0200
+++ b/sat/plugins/plugin_pubsub_cache.py	Mon Aug 02 21:52:17 2021 +0200
@@ -389,7 +389,6 @@
                 analyse["conf"] = conf
 
         for analyser in self.analysers.values():
-            match_cb = analyser.get("match_cb")
             try:
                 an_node = analyser["node"]
             except KeyError:
@@ -429,7 +428,7 @@
             except KeyError:
                 pass
             else:
-                await match_cb(client, analyse)
+                await utils.asDeferred(match_cb, client, analyse)
         return analyse
 
     def _getItemsFromCache(