EVECelery.tasks.Samples.CachedAddTask#
Module Contents#
Classes#
A cache response pydantic model for validation. |
|
A task utilizing Redis for some form of caching and locks where the results are cached. |
- class EVECelery.tasks.Samples.CachedAddTask.ModelResponse#
Bases:
EVECelery.tasks.BaseTasks.TaskCached.ModelCachedResponseA cache response pydantic model for validation.
- result: float#
- class EVECelery.tasks.Samples.CachedAddTask.AddTask#
Bases:
EVECelery.tasks.BaseTasks.TaskCached.TaskCachedA task utilizing Redis for some form of caching and locks where the results are cached.
- _run_get_result(a, b)#
The task body to execute if the result is not currently cached.
This function is the body of a task that gets executed when a previously returned result is not cached or has expired. This function must return a pydantic model that inherits from
ModelCachedResponse()orModelCachedException().If
ModelCachedException()is returned, then the exception will be cached for the defined TTL and have an exception thrown to the calling client.- Returns:
The response success or cached exception pydantic model.