comparison libervia/backend/core/xmpp.py @ 4265:2417ad1d0f23

core (xmpp): fix message workflow interruption from trigger.
author Goffi <goffi@goffi.org>
date Wed, 12 Jun 2024 22:37:04 +0200
parents 314d3c02bb67
children 0d7bb4df2343
comparison
equal deleted inserted replaced
4264:3fbd1a1285c1 4265:2417ad1d0f23
1381 10, 1381 10,
1382 self._on_processing_timeout, 1382 self._on_processing_timeout,
1383 message_elt, 1383 message_elt,
1384 async_point_d 1384 async_point_d
1385 ) 1385 )
1386 await async_point_d 1386 trigger_ret_continue = await async_point_d
1387
1387 if delayed_call.active(): 1388 if delayed_call.active():
1388 delayed_call.cancel() 1389 delayed_call.cancel()
1389 log.debug(f"delayed_call for {async_point_d} cancelled") 1390 log.debug(f"delayed_call for {async_point_d} cancelled")
1391
1392 if not trigger_ret_continue:
1393 # trigger returned False, we stop the workflow.
1394 return
1395
1390 try: 1396 try:
1391 data = self.parse_message(message_elt) 1397 data = self.parse_message(message_elt)
1392 # we now do all post treatments added by plugins 1398 # we now do all post treatments added by plugins
1393 post_treat.callback(data) 1399 post_treat.callback(data)
1394 await post_treat 1400 await post_treat