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
This commit is contained in:
parent
c2ee7cbbbc
commit
9f6d69c75d
1 changed files with 6 additions and 1 deletions
|
|
@ -132,7 +132,12 @@ class APGateway:
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue