From a04595198ded086fa2f39201ca5f9afa2f696d4a Mon Sep 17 00:00:00 2001
From: ChrisLovering Bases: Bases: Schedule the execution of coroutines and keep track of them. When instantiating a
objectobjectScheduler, a name must be provided. This name is used to distinguish the
instance’s log messages from other instances. Using the name of the class or module containing
@@ -361,16 +361,16 @@ the same ID used to schedule it.
Initialize a new Scheduler instance.
Unschedule the task identified by task_id. Log a warning if the task doesn’t exist.
Unschedule all known tasks.
If a task with task_id already exists, close coroutine instead of scheduling it. This
prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.
timeIf a task with task_id already exists, close coroutine instead of scheduling it. This
prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.
-- Parameters
+- Parameters:
-time (datetime) – The time to start the task.
-task_id (Hashable) – A unique ID to create the task with.
-coroutine (Coroutine) – The function to be called.
+time (datetime) – The time to start the task.
+task_id (Hashable) – A unique ID to create the task with.
+coroutine (Coroutine) – The function to be called.
-- Return type
--
+
- Return type:
+-
@@ -460,15 +460,15 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-
If a task with task_id already exists, close coroutine instead of scheduling it. This
prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-used elsewhere.
-- Parameters
+- Parameters:
-delay (Union[int, float]) – How long to wait before starting the task.
-task_id (Hashable) – A unique ID to create the task with.
-coroutine (Coroutine) – The function to be called.
+delay (Union[int, float]) – How long to wait before starting the task.
+task_id (Hashable) – A unique ID to create the task with.
+coroutine (Coroutine) – The function to be called.
-- Return type
--
+
- Return type:
+-
@@ -478,23 +478,23 @@ prevents unawaited coroutine warnings. Don’t pass a coroutine that’ll be re-
-
create_task(coro, *, suppressed_exceptions=(), event_loop=None, **kwargs)[source]#
-Wrapper for creating an asyncio.Task which logs exceptions raised in the task.
+Wrapper for creating an asyncio.Task which logs exceptions raised in the task.
If the event_loop kwarg is provided, the task is created from that event loop,
otherwise the running loop is used.
-- Parameters
+- Parameters:
-coro (Coroutine[Any, Any, TypeVar(TASK_RETURN)]) – The function to call.
-suppressed_exceptions (tuple[type[Exception], ...]) – Exceptions to be handled by the task.
-event_loop (asyncio.AbstractEventLoop) – The loop to create the task from.
-kwargs – Passed to asyncio.create_task().
+coro (Coroutine[Any, Any, TypeVar(TASK_RETURN)]) – The function to call.
+suppressed_exceptions (tuple[type[Exception], ...]) – Exceptions to be handled by the task.
+event_loop (asyncio.AbstractEventLoop) – The loop to create the task from.
+kwargs – Passed to asyncio.create_task().
-- Returns
+- Returns:
The wrapped task.
-- Return type
--
+
- Return type:
+-
--
cgit v1.2.3