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 operator asyc execution check #3512

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fiftyone/operators/executor.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
|
"""
import asyncio
import inspect
import traceback
import types as python_types

@@ -199,7 +200,7 @@ async def execute_or_delegate_operator(operator_uri, request_params):
try:
raw_result = await (
operator.execute(ctx)
if asyncio.iscoroutinefunction(operator.execute)
if inspect.isawaitable(operator.execute)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will always return false. These are not functionally equivelent.

Copy link
Contributor

Choose a reason for hiding this comment

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

image

else fou.run_sync_task(operator.execute, ctx)
)