:py:mod:`EVECelery.tasks.Samples.CachedAddTask` =============================================== .. py:module:: EVECelery.tasks.Samples.CachedAddTask Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: EVECelery.tasks.Samples.CachedAddTask.ModelResponse EVECelery.tasks.Samples.CachedAddTask.AddTask .. py:class:: ModelResponse Bases: :py:obj:`EVECelery.tasks.BaseTasks.TaskCached.ModelCachedResponse` A cache response pydantic model for validation. .. py:attribute:: result :type: float .. py:class:: AddTask Bases: :py:obj:`EVECelery.tasks.BaseTasks.TaskCached.TaskCached` A task utilizing Redis for some form of caching and locks where the results are cached. .. py:method:: _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 :func:`ModelCachedResponse` or :func:`ModelCachedException`. If :func:`ModelCachedException` is returned, then the exception will be cached for the defined TTL and have an exception thrown to the calling client. :return: The response success or cached exception pydantic model.