Skip to content

Commit

Permalink
find run_task not await coro crux
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Dec 29, 2024
1 parent a078400 commit 5746ae8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/aiida/brokers/rabbitmq/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ def add_broadcast_subscriber(
sender_filters=None,
identifier=None,
):
subscriber = kiwipy.BroadcastFilter(subscriber)

subject_filters = subject_filters or []
sender_filters = sender_filters or []

for filter in subject_filters:
subscriber.add_subject_filter(filter)
for filter in sender_filters:
subscriber.add_sender_filter(filter)
# XXX: this change behavior of create_task when decide whether the broadcast is_filtered.
# Need to understand the BroadcastFilter and make the improvement.
# To manifest the issue of run_task not await, run twice 'test_launch.py::test_submit_wait'.

# subscriber = kiwipy.BroadcastFilter(subscriber)
#
# subject_filters = subject_filters or []
# sender_filters = sender_filters or []
#
# for filter in subject_filters:
# subscriber.add_subject_filter(filter)
# for filter in sender_filters:
# subscriber.add_sender_filter(filter)

subscriber = convert_to_comm(subscriber, self._loop)
return self._comm.add_broadcast_subscriber(subscriber, identifier)
Expand Down

0 comments on commit 5746ae8

Please sign in to comment.