some-grass-84903
05/26/2023, 11:56 AMPythonCustomizedContainerTask[T]
and PythonTask[PluginConfig]
.
I then started using my plugin in the workflow, which works out fine. Now I would like to apply caching and other usual decorators like requests and limit. How can I achieve this, as I don't have the classic Task(...)
decorator for my plugin?
class GlueTask(PythonCustomizedContainerTask[T], PythonTask[GlueConfig]):
# following the usual init
class GlueTaskExecutor(ShimTaskExecutor[GlueTask]):
def execute_from_model(self, tt: task_models.TaskTemplate, **kwargs) -> typing.Any:
# my plugin execution code
# usage in workflow
GlueTask(name="testing", task_config=GlueConfig(crawler_name="test-crawler"), container_image="bla",cache=True, cache_version="1.0")()
That cache
parameters don't throw errors, but also don't do caching.some-grass-84903
05/26/2023, 12:09 PMsome-grass-84903
05/26/2023, 12:12 PMGlueTask(name="testing", task_config=GlueConfig(crawler_name="test-crawler-delete-me"), container_image="bla", metadata=TaskMetadata(cache=True, cache_version="1.0"))()
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
some-grass-84903
05/30/2023, 9:00 AM