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

Make Task.serve sync compatible #14184

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Make Task.serve sync compatible #14184

merged 2 commits into from
Jun 20, 2024

Conversation

bunchesofdonald
Copy link
Contributor

Updates Task.serve to be sync_compatible to align with Flow.serve.

Closes #13446

Checklist

  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.
  • 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.

@bunchesofdonald bunchesofdonald added the fix A fix for a bug in an existing feature label Jun 20, 2024
@bunchesofdonald bunchesofdonald requested a review from a team as a code owner June 20, 2024 16:39
@@ -1284,7 +1287,8 @@ def delay(self, *args: P.args, **kwargs: P.kwargs) -> PrefectDistributedFuture:
"""
return self.apply_async(args=args, kwargs=kwargs)

def serve(self) -> "Task":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the return type hint here as nothing is returned by this function or the serve function it calls.

src/prefect/tasks.py Outdated Show resolved Hide resolved
Co-authored-by: nate nowack <thrast36@gmail.com>
@bunchesofdonald bunchesofdonald merged commit 095b480 into main Jun 20, 2024
24 of 25 checks passed
@bunchesofdonald bunchesofdonald deleted the issue-13446 branch June 20, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Task.serve a sync-compatible coroutine
2 participants