Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update global-concurrency-limits.mdx - Remove await for task submissions #15581

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

biancaines
Copy link
Contributor

Awaiting task submissions in the async code examples throws an error with Prefect 3.0. ie:

TypeError: object PrefectConcurrentFuture can't be used in 'await' expression

Updating the examples so that await is no longer included before submitting a task allows them to complete successfully.

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

…sions

Awaiting task submissions in the async code examples throws an error with Prefect 3.0. ie:

TypeError: object PrefectConcurrentFuture can't be used in 'await' expression

Updating the examples so that `await` is no longer included before submitting a task allows them to complete successfully.
Copy link
Contributor

@discdiver discdiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @biancaines!

I think that since submit is now a sync method, the parent flows no longer need to be async, and I think it might be confusing to have them async if they're just calling sync methods

docs/3.0/develop/global-concurrency-limits.mdx Outdated Show resolved Hide resolved
docs/3.0/develop/global-concurrency-limits.mdx Outdated Show resolved Hide resolved
@zzstoatzz zzstoatzz merged commit f8bcb64 into main Oct 4, 2024
4 checks passed
@zzstoatzz zzstoatzz deleted the biancaines-patch-global-concurrency-docs branch October 4, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants