Skip to content

Commit cf06396

Browse files
committed
Revert "support cache task (#50)"
This reverts commit cf62349.
1 parent f76aa0b commit cf06396

5 files changed

Lines changed: 0 additions & 23 deletions

File tree

examples/yaml_define/MoreConfiguration.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ tasks:
3636
fail_retry_times: 30
3737
fail_retry_interval: 5
3838
timeout: 60
39-
is_cache: true
4039
input_params:
4140
value_VARCHAR: "abc"
4241
value_INTEGER: 123

src/pydolphinscheduler/constants.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ class TaskFlag(str):
3535
NO = "NO"
3636

3737

38-
class IsCache(str):
39-
"""Constants for Cache."""
40-
41-
YES = "YES"
42-
NO = "NO"
43-
44-
4538
class TaskTimeoutFlag(str):
4639
"""Constants for task timeout flag."""
4740

src/pydolphinscheduler/core/task.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from pydolphinscheduler import configuration
2727
from pydolphinscheduler.constants import (
2828
Delimiter,
29-
IsCache,
3029
ResourceKey,
3130
Symbol,
3231
TaskFlag,
@@ -101,7 +100,6 @@ class Task(Base):
101100
:param wait_start_timeout: default None
102101
:param condition_result: default None,
103102
:param resource_plugin: default None
104-
:param is_cache: default False
105103
:param input_params: default None, input parameters, {param_name: param_value}
106104
:param output_params: default None, input parameters, {param_name: param_value}
107105
"""
@@ -123,7 +121,6 @@ class Task(Base):
123121
"timeout_flag",
124122
"timeout_notify_strategy",
125123
"timeout",
126-
"is_cache",
127124
}
128125

129126
# task default attribute will into `task_params` property
@@ -164,7 +161,6 @@ def __init__(
164161
wait_start_timeout: Optional[Dict] = None,
165162
condition_result: Optional[Dict] = None,
166163
resource_plugin: Optional[ResourcePlugin] = None,
167-
is_cache: Optional[bool] = False,
168164
input_params: Optional[Dict] = None,
169165
output_params: Optional[Dict] = None,
170166
*args,
@@ -173,7 +169,6 @@ def __init__(
173169
super().__init__(name, description)
174170
self.task_type = task_type
175171
self.flag = flag
176-
self._is_cache = is_cache
177172
self.task_priority = task_priority
178173
self.worker_group = worker_group
179174
self._environment_name = environment_name
@@ -251,14 +246,6 @@ def timeout_flag(self) -> str:
251246
"""Whether the timeout attribute is being set or not."""
252247
return TaskTimeoutFlag.ON if self._timeout else TaskTimeoutFlag.OFF
253248

254-
@property
255-
def is_cache(self) -> str:
256-
"""Whether the cache is being set or not."""
257-
if isinstance(self._is_cache, bool):
258-
return IsCache.YES if self._is_cache else IsCache.NO
259-
else:
260-
raise PyDSParamException("is_cache must be a bool")
261-
262249
@property
263250
def resource_list(self) -> List[Dict[str, Resource]]:
264251
"""Get task define attribute `resource_list`."""

tests/core/test_engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def test_property_task_params(mock_resource, mock_code_version, attr, expect):
122122
"waitStartTimeout": {},
123123
},
124124
"flag": "YES",
125-
"isCache": "NO",
126125
"taskPriority": "MEDIUM",
127126
"workerGroup": "default",
128127
"environmentCode": None,

tests/core/test_task.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ def test_task_get_define():
252252
"waitStartTimeout": {},
253253
},
254254
"flag": "YES",
255-
"isCache": "NO",
256255
"taskPriority": "MEDIUM",
257256
"workerGroup": "default",
258257
"environmentCode": None,

0 commit comments

Comments
 (0)