vcorelib.task.time.sleep
index
/home/vkottler/src/vkottler/workspace/vcorelib/vcorelib/task/time/sleep.py

A module implementing a task that can be used to sleep.

 
Modules
       
asyncio

 
Classes
       
vcorelib.task.Task(vcorelib.logging.LoggerMixin)
SleepTask

 
class SleepTask(vcorelib.task.Task)
    SleepTask(name: 'str', *args, execute: 'TaskExecute' = None, log: 'Logger' = None, timer: 'Timer' = None, target: 'Target' = None, **kwargs) -> 'None'
 
A task for sleeping for some duration.
 
 
Method resolution order:
SleepTask
vcorelib.task.Task
vcorelib.logging.LoggerMixin
builtins.object

Methods defined here:
async run(self, inbox: Dict[str, Dict[str, Any]], outbox: Dict[str, Any], *args, **kwargs) -> bool
Sleep for the amount of time specified.

Data and other attributes defined here:
__annotations__ = {}

Methods inherited from vcorelib.task.Task:
__init__(self, name: 'str', *args, execute: 'TaskExecute' = None, log: 'Logger' = None, timer: 'Timer' = None, target: 'Target' = None, **kwargs) -> 'None'
Initialize this task.
__str__(self) -> 'str'
Convert this task into a string.
create_execute(self, *args, **kwargs) -> 'TaskExecute'
Create a default execute function for this task.
depend_on(self, task: "'Task'", eloop: '_asyncio.AbstractEventLoop' = None, **kwargs) -> 'bool'
Register other tasks' output data to your input box. Return true
if a new dependency was added.
depend_on_all(self, tasks: "_Iterable['Task']", **kwargs) -> 'int'
Register multiple dependencies. Return the number of dependencies
added.
async dispatch(self, caller: "'Task'" = None, init_only: 'bool' = False, substitutions: 'Substitutions' = None, **kwargs) -> 'None'
Dispatch this task and return whether or not it succeeded.
dispatch_init(self, caller: "'Task'" = None, substitutions: 'Substitutions' = None, **kwargs) -> '_Tuple[Substitutions, str]'
Perform some dispatch initialization.
resolve(self, log: 'Logger', compiled: 'str', substitutions: 'Substitutions' = None) -> 'None'
Mark this task resolved.
async resolve_dependencies(self, **substitutions) -> 'None'
A default dependency resolver for tasks. Note that the default
dependency resolver cannot propagate current-task substitutions to
its dependencies as they've already been explicitly registered.
resolved(self, compiled: 'str', substitutions: 'Substitutions' = None) -> 'bool'
Override this in a derived task to implement more complex logic.
async run_enter(self, _inbox: 'Inbox', _outbox: 'Outbox', *_args, **_kwargs) -> 'bool'
A default enter method.
async run_exit(self, _inbox: 'Inbox', _outbox: 'Outbox', *_args, **_kwargs) -> 'bool'
A default exit method.
task_fail(self, compiled: 'str', substitutions: 'Substitutions', caller: "'Task'" = None, indent: 'int' = 4) -> 'TaskFailed'
Build an exception message for when this task fails.

Readonly properties inherited from vcorelib.task.Task:
stack
Get this task's execution stack.

Data and other attributes inherited from vcorelib.task.Task:
default_requirements = set()
stages = ['run_enter', 'run', 'run_exit']

Methods inherited from vcorelib.logging.LoggerMixin:
log_time(self, message: str, *args, level: int = 20, reminder: bool = False, **kwargs) -> Iterator[NoneType]
A simple wrapper.

Data descriptors inherited from vcorelib.logging.LoggerMixin:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Data
        Outbox = typing.Dict[str, typing.Any]