Skip to content

Commit 747303c

Browse files
committed
fix notification in support exectuor func
1 parent 2313287 commit 747303c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

cms/post_publish_actions/executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def run_bundle_notification_in_support_executor[**P](
157157
) -> Future:
158158
previous = _bundle_notification_futures.get(bundle_id)
159159
future = run_in_support_executor(_run_after, previous, fn, *args, **kwargs)
160+
_bundle_notification_futures[bundle_id] = future
160161
return future
161162

162163

cms/post_publish_actions/tests/test_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def slow_start_notification():
9393
def test_bundle_notifications_for_different_bundles_are_not_chained(self):
9494
order = []
9595

96-
executor.run_bundle_notification_in_support_executor(1, lambda: (time.sleep(1)), order.append("first"))
96+
executor.run_bundle_notification_in_support_executor(1, lambda: (time.sleep(0.5), order.append("first")))
9797
executor.run_bundle_notification_in_support_executor(2, lambda: (order.append("second")))
9898
executor.wait_for_bundle_notifications(2)
9999

0 commit comments

Comments
 (0)