Skip to content

Others

cfg = Config() module-attribute

and_(a, b)

Equivalent of and wrapped in ExecNode.

or_(a, b)

Equivalent of or wrapped in ExecNode.

not_(a)

Equivalent of not wrapped in ExecNode.

Resource

Bases: str, Enum

The Resource to use launching ExecNodes inside the DAG scheduler a DAG.

Resource can be either:
1. "main-thread": Launch the ExecNode inside the main thread, directly inside the main scheduler.
2. "thread": Launch the ExecNode in a thread (Default)
3. "async-thread": Launch the ExecNode in an async thread and await it

Notice that when "main-thread" is used, some of the scheduler functionalities stop working as previously expected:
1. No new ExecNode will be launched during the execution of the corresponding ExecNode
2. If timeout is set on the corresponding ExecNode, it is not guaranteed to work properly.

main_thread: str = 'main-thread' class-attribute instance-attribute

thread: str = 'thread' class-attribute instance-attribute

async_thread: str = 'async-thread' class-attribute instance-attribute