Skip to content

Commit

Permalink
Make sure sync and async versions are updated
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle committed Feb 5, 2025
1 parent 2664ecb commit 328e909
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/prefect/deployments/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,9 @@ def _construct_deployment_schedules(
this list is returned as-is, bypassing other schedule construction
logic.
"""

num_schedules = sum(
1
for entry in (interval, cron, rrule, schedule, schedules, schedule)
for entry in (interval, cron, rrule, schedule, schedules)
if entry is not None
)
if num_schedules > 1:
Expand Down
2 changes: 2 additions & 0 deletions src/prefect/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ def my_other_flow(name):
cron=cron,
rrule=rrule,
paused=paused,
schedule=schedule,
schedules=schedules,
concurrency_limit=concurrency_limit,
tags=tags,
Expand All @@ -772,6 +773,7 @@ def my_other_flow(name):
cron=cron,
rrule=rrule,
paused=paused,
schedule=schedule,
schedules=schedules,
concurrency_limit=concurrency_limit,
tags=tags,
Expand Down
2 changes: 1 addition & 1 deletion src/prefect/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async def add_flow(
entrypoint, ensure that the module will be importable in the execution environment.
"""
api = PREFECT_API_URL.value()
if any([interval, cron, rrule]) and not api:
if any([interval, cron, rrule, schedule, schedules]) and not api:
self._logger.warning(
"Cannot schedule flows on an ephemeral server; run `prefect server"
" start` to start the scheduler."
Expand Down

0 comments on commit 328e909

Please sign in to comment.