PrefectHQ
prefect
BlogDocsChangelog

Migrate `pause_flow_run` and `suspend_flow_run` from `@sync_compatible` to `@async_dispatch`

#20178
Comparing
devin/1768236241-migrate-pause-suspend-flow-run-async-dispatch
(
85fe13e
) with
main
(
6db72bd
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
+1%
605 µs599.6 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
166.3 ms165.6 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+13%
12.5 ms11 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-4%
32.1 ms33.5 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-3%
5.6 ms5.8 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
106.2 ms106.7 ms

Commits

Click on a commit to change the comparison range
Base
main
6db72bd
-0.14%
Migrate pause_flow_run and suspend_flow_run from @sync_compatible to @async_dispatch Part of #15008: Synchronous and asynchronous compatibility within Prefect - Create apause_flow_run async function with @async_dispatch pattern - Create asuspend_flow_run async function with @async_dispatch pattern - Replace @sync_compatible with @async_dispatch on sync versions - Update exports in main.py and __init__.py - Add tests for async dispatch behavior Co-Authored-By: Nate Nowack <nate@prefect.io>
da74a96
12 hours ago
by devin-ai-integration[bot]
+0.18%
Move _in_process_pause from MOVED_IN_V3 to REMOVED_IN_V3 The _in_process_pause helper function was removed and its logic inlined into apause_flow_run. Update migration.py to mark it as removed instead of moved, with a message directing users to use pause_flow_run instead. Co-Authored-By: Nate Nowack <nate@prefect.io>
8b3af0e
12 hours ago
by devin-ai-integration[bot]
-0.27%
Fix wait_for_input handling in sync pause_flow_run and suspend_flow_run Replace placeholder pass statements with actual calls to wait_for_input.load() and wait_for_input.save(). These methods are decorated with @sync_compatible so they can be called synchronously. Co-Authored-By: Nate Nowack <nate@prefect.io>
0f83cbb
10 hours ago
by devin-ai-integration[bot]
+0.44%
Replace @sync_compatible method calls with direct sync implementations Instead of calling wait_for_input.load() and wait_for_input.save() which use @sync_compatible, create helper functions _load_input_sync() and _save_input_schema_sync() that use the sync versions of the underlying functions (read_flow_run_input and create_flow_run_input) directly. This addresses the feedback that the point of issue 15008 is to remove @sync_compatible, so we shouldn't rely on methods that use it. Co-Authored-By: Nate Nowack <nate@prefect.io>
5a0e029
6 hours ago
by devin-ai-integration[bot]
+0.23%
Move ensure_flow_run_id import to top-level Avoid unnecessary deferred import in _load_input_sync function. Co-Authored-By: Nate Nowack <nate@prefect.io>
85fe13e
6 hours ago
by devin-ai-integration[bot]
© 2026 CodSpeed Technology
Home Terms Privacy Docs