File tree Expand file tree Collapse file tree
src/conductor/client/automator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,7 +266,15 @@ def __create_task_runner_process(
266266 metrics_settings : MetricsSettings
267267 ) -> None :
268268 # Detect if worker function is async
269- is_async_worker = inspect .iscoroutinefunction (worker .execute_function )
269+ # For function-based workers (@worker_task), check execute_function
270+ # For class-based workers, check execute method
271+ is_async_worker = False
272+ if hasattr (worker , 'execute_function' ):
273+ # Function-based worker (created with @worker_task decorator)
274+ is_async_worker = inspect .iscoroutinefunction (worker .execute_function )
275+ else :
276+ # Class-based worker (implements WorkerInterface)
277+ is_async_worker = inspect .iscoroutinefunction (worker .execute )
270278
271279 if is_async_worker :
272280 # Use AsyncTaskRunner for async def workers
You can’t perform that action at this time.
0 commit comments