From da2d8c8f8228a52469ec08b976cd87e5aa9c8cb9 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Tue, 26 Oct 2021 18:57:14 +0200 Subject: [PATCH] use task_producer helper --- slic/core/adjustable/adjustable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slic/core/adjustable/adjustable.py b/slic/core/adjustable/adjustable.py index 95964fe20..770dc7783 100644 --- a/slic/core/adjustable/adjustable.py +++ b/slic/core/adjustable/adjustable.py @@ -1,5 +1,5 @@ from slic.utils import typename -from slic.core.task import Task +from slic.core.task import Task, task_producer from .baseadjustable import BaseAdjustable from .convenience import SpecConvenience @@ -13,6 +13,8 @@ class Adjustable(BaseAdjustable, SpecConvenience): self.internal = internal self.current_task = None + self.set_target_value = task_producer(self, self.set_target_value) + def _as_task(self, *args, **kwargs): self.current_task = task = Task(*args, **kwargs)