quart_tasks.store module#
- class quart_tasks.store.MemoryStore#
Bases:
TaskStoreABCAn in memory store of execution times.
- async get(key: str, default: datetime) datetime#
Get the last execution time for the task for the given key if present or the default if not.
- Parameters:
key – The key to indentify the task.
default – If no last execution for the key is available, return this default.
- Returns:
The last execution time.
- async set(key: str, executed: datetime) None#
Set the execution time for the given key.
- Parameters:
key – The key to indentify the task.
executed – The time it was executed.
- async shutdown() None#
A coroutine within which any cleanup can be done.
- async startup() None#
A coroutine within which any setup can be done.
- class quart_tasks.store.TaskStoreABC#
Bases:
object- abstractmethod async get(key: str, default: datetime) datetime#
Get the last execution time for the task for the given key if present or the default if not.
- Parameters:
key – The key to indentify the task.
default – If no last execution for the key is available, return this default.
- Returns:
The last execution time.
- abstractmethod async set(key: str, executed: datetime) None#
Set the execution time for the given key.
- Parameters:
key – The key to indentify the task.
executed – The time it was executed.
- abstractmethod async shutdown() None#
A coroutine within which any cleanup can be done.
- abstractmethod async startup() None#
A coroutine within which any setup can be done.