# HG changeset patch # User Goffi # Date 1657796130 -7200 # Node ID 4479f6074bc81fc2b5cd31225581042b68d48718 # Parent bc24ce903835c05e3c8e0b69fa95e4d895dc367e component AP gateway: use the new `priority` argument of `addManagedNode`: priority is needed because we'll need to inspect former items on retract to check the Acitivy to use (it may be an `Undo` activity is some cases), and this must be done before the cache is updated by pubsub cache plugin. rel 370 diff -r bc24ce903835 -r 4479f6074bc8 sat/plugins/plugin_comp_ap_gateway/__init__.py --- a/sat/plugins/plugin_comp_ap_gateway/__init__.py Thu Jul 14 12:55:30 2022 +0200 +++ b/sat/plugins/plugin_comp_ap_gateway/__init__.py Thu Jul 14 12:55:30 2022 +0200 @@ -132,7 +132,12 @@ self._t = host.plugins["TEXT_SYNTAXES"] self._i = host.plugins["IDENTITY"] self._p.addManagedNode( - "", items_cb=self._itemsReceived + "", + items_cb=self._itemsReceived, + # we want to be sure that the callbacks are launched before pubsub cache's + # one, as we need to inspect items before they are actually removed from cache + # or updated + priority=1000 ) self.pubsub_service = APPubsubService(self) host.trigger.add("messageReceived", self._messageReceivedTrigger, priority=-1000)