Skip to main content

execute_callback_sync

Method
This is a method of the Task class in the task module.
Synchronous wrapper to ensure that execute_callback is awaited, preventing ‘Task was destroyed but pending!’ warnings if called from non-async code.

Signature

def execute_callback_sync(task_output: TaskOutput) -> None

Parameters

task_output
TaskOutput
required
No description available.

Uses

  • asyncio.get_running_loop
  • loop.is_running
  • loop.create_task
  • execute_callback
  • loop.run_until_complete
  • asyncio.run

Used By

Source

View on GitHub

praisonaiagents/task/task.py at line 707