zrb 0.17.5__py3-none-any.whl → 0.18.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zrb/task/any_task.py +7 -0
- zrb/task/base_remote_cmd_task.py +63 -5
- zrb/task/base_task/base_task.py +1 -38
- zrb/task/base_task/component/common_task_model.py +34 -3
- zrb/task/cmd_task.py +21 -8
- zrb/task/rsync_task.py +4 -4
- zrb/task/server.py +2 -2
- zrb/task/task.py +20 -20
- {zrb-0.17.5.dist-info → zrb-0.18.1.dist-info}/METADATA +1 -1
- {zrb-0.17.5.dist-info → zrb-0.18.1.dist-info}/RECORD +13 -13
- {zrb-0.17.5.dist-info → zrb-0.18.1.dist-info}/LICENSE +0 -0
- {zrb-0.17.5.dist-info → zrb-0.18.1.dist-info}/WHEEL +0 -0
- {zrb-0.17.5.dist-info → zrb-0.18.1.dist-info}/entry_points.txt +0 -0
zrb/task/any_task.py
CHANGED
zrb/task/base_remote_cmd_task.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import copy
|
2
1
|
import os
|
3
2
|
import pathlib
|
4
3
|
|
@@ -50,8 +49,10 @@ class RemoteConfig:
|
|
50
49
|
password: JinjaTemplate = "",
|
51
50
|
ssh_key: JinjaTemplate = "",
|
52
51
|
port: Union[int, JinjaTemplate] = 22,
|
52
|
+
name: Optional[str] = None,
|
53
53
|
config_map: Optional[Mapping[str, JinjaTemplate]] = None,
|
54
54
|
):
|
55
|
+
self.name = name if name is not None else host
|
55
56
|
self.host = host
|
56
57
|
self.user = user
|
57
58
|
self.password = password
|
@@ -227,6 +228,7 @@ class BaseRemoteCmdTask(BaseTask):
|
|
227
228
|
post_cmd_path: CmdVal = "",
|
228
229
|
cwd: Optional[Union[str, pathlib.Path]] = None,
|
229
230
|
upstreams: Iterable[AnyTask] = [],
|
231
|
+
fallbacks: Iterable[AnyTask] = [],
|
230
232
|
on_triggered: Optional[OnTriggered] = None,
|
231
233
|
on_waiting: Optional[OnWaiting] = None,
|
232
234
|
on_skipped: Optional[OnSkipped] = None,
|
@@ -247,9 +249,10 @@ class BaseRemoteCmdTask(BaseTask):
|
|
247
249
|
should_show_cmd: bool = True,
|
248
250
|
should_show_working_directory: bool = True,
|
249
251
|
):
|
250
|
-
|
252
|
+
self._remote_configs = list(remote_configs)
|
253
|
+
self._sub_tasks = [
|
251
254
|
SingleBaseRemoteCmdTask(
|
252
|
-
name=f"{name}-{remote_config.
|
255
|
+
name=f"{name}-{remote_config.name}",
|
253
256
|
remote_config=remote_config,
|
254
257
|
inputs=inputs,
|
255
258
|
envs=envs,
|
@@ -264,6 +267,7 @@ class BaseRemoteCmdTask(BaseTask):
|
|
264
267
|
post_cmd_path=post_cmd_path,
|
265
268
|
cwd=cwd,
|
266
269
|
upstreams=upstreams,
|
270
|
+
fallbacks=fallbacks,
|
267
271
|
on_triggered=on_triggered,
|
268
272
|
on_waiting=on_waiting,
|
269
273
|
on_skipped=on_skipped,
|
@@ -284,7 +288,7 @@ class BaseRemoteCmdTask(BaseTask):
|
|
284
288
|
should_show_cmd=should_show_cmd,
|
285
289
|
should_show_working_directory=should_show_working_directory,
|
286
290
|
)
|
287
|
-
for remote_config in
|
291
|
+
for remote_config in self._remote_configs
|
288
292
|
]
|
289
293
|
BaseTask.__init__(
|
290
294
|
self,
|
@@ -293,7 +297,61 @@ class BaseRemoteCmdTask(BaseTask):
|
|
293
297
|
color=color,
|
294
298
|
group=group,
|
295
299
|
description=description,
|
296
|
-
upstreams=
|
300
|
+
upstreams=self._sub_tasks,
|
297
301
|
retry=0,
|
298
302
|
return_upstream_result=True,
|
299
303
|
)
|
304
|
+
|
305
|
+
def insert_input(self, *inputs: AnyInput):
|
306
|
+
super().insert_input(*inputs)
|
307
|
+
for subtask in self._sub_tasks:
|
308
|
+
subtask.insert_input(*inputs)
|
309
|
+
|
310
|
+
def add_input(self, *inputs: AnyInput):
|
311
|
+
super().add_input(*inputs)
|
312
|
+
for subtask in self._sub_tasks:
|
313
|
+
subtask.add_input(*inputs)
|
314
|
+
|
315
|
+
def insert_env(self, *envs: Env):
|
316
|
+
super().insert_env(*envs)
|
317
|
+
for subtask in self._sub_tasks:
|
318
|
+
subtask.insert_env(*envs)
|
319
|
+
|
320
|
+
def add_env(self, *envs: Env):
|
321
|
+
super().add_env(*envs)
|
322
|
+
for subtask in self._sub_tasks:
|
323
|
+
subtask.add_env(*envs)
|
324
|
+
|
325
|
+
def insert_env_file(self, *env_files: EnvFile):
|
326
|
+
super().insert_env_file(*env_files)
|
327
|
+
for subtask in self._sub_tasks:
|
328
|
+
subtask.insert_env_file(*env_files)
|
329
|
+
|
330
|
+
def add_env_file(self, *env_files: Env):
|
331
|
+
super().add_env_file(*env_files)
|
332
|
+
for subtask in self._sub_tasks:
|
333
|
+
subtask.add_env_file(*env_files)
|
334
|
+
|
335
|
+
def insert_upstream(self, *upstreams: AnyTask):
|
336
|
+
for subtask in self._sub_tasks:
|
337
|
+
subtask.insert_upstream(*upstreams)
|
338
|
+
|
339
|
+
def add_upstream(self, *upstreams: AnyTask):
|
340
|
+
for subtask in self._sub_tasks:
|
341
|
+
subtask.add_upstream(*upstreams)
|
342
|
+
|
343
|
+
def insert_fallback(self, *fallbacks: AnyTask):
|
344
|
+
for subtask in self._sub_tasks:
|
345
|
+
subtask.insert_fallbacks(*fallbacks)
|
346
|
+
|
347
|
+
def add_fallback(self, *fallbacks: AnyTask):
|
348
|
+
for subtask in self._sub_tasks:
|
349
|
+
subtask.add_fallback(*fallbacks)
|
350
|
+
|
351
|
+
def insert_checker(self, *checkers: AnyTask):
|
352
|
+
for subtask in self._sub_tasks:
|
353
|
+
subtask.insert_checkers(*checkers)
|
354
|
+
|
355
|
+
def add_checker(self, *checkers: AnyTask):
|
356
|
+
for subtask in self._sub_tasks:
|
357
|
+
subtask.add_checker(*checkers)
|
zrb/task/base_task/base_task.py
CHANGED
@@ -39,42 +39,6 @@ class BaseTask(FinishTracker, AttemptTracker, Renderer, BaseTaskModel, AnyTask):
|
|
39
39
|
"""
|
40
40
|
Base class for all Tasks.
|
41
41
|
Every Task definition should be extended from this class.
|
42
|
-
|
43
|
-
Task is the smallest Zrb automation unit.
|
44
|
-
|
45
|
-
You can configure a Task by using several interfaces:
|
46
|
-
- `inputs`: interfaces to read user input at the beginning of the execution.
|
47
|
-
- `envs`: interfaces to read and use OS Environment Variables.
|
48
|
-
- `env_files`: interfaces to read and use Environment Files.
|
49
|
-
|
50
|
-
Moreover, you can define Task dependencies by specifying it's `upstreams` or by using shift-right operator.
|
51
|
-
|
52
|
-
Every Task has its own life-cycle state:
|
53
|
-
- `Triggered`: The Task is triggered.
|
54
|
-
- `Waiting`: The Task is waiting for all it's upstreams to be ready.
|
55
|
-
- `Skipped`: The Task is not executed and will immediately enter the `Ready` state.
|
56
|
-
- `Started`: The Task execution is started.
|
57
|
-
- `Failed`: The Task execution is failed. It will enter the `Retry` state if the current attempt is less than the maximum attempt.
|
58
|
-
- `Retry`: The task will be restarted.
|
59
|
-
- `Ready`: The task is ready.
|
60
|
-
|
61
|
-
There are several configurations related to Task's life cycle:
|
62
|
-
- `retry`: How many retries should be attempted.
|
63
|
-
- `retry_interval`: How long to wait before the next retry attempt.
|
64
|
-
- `fallbacks`: What to do if the Task is failed and no retry attempt will be performed.
|
65
|
-
- `checkers`: How to determine if a Task is `Ready`.
|
66
|
-
- `checking_interval`: How long to wait before checking for Task's readiness.
|
67
|
-
- `run`: What a Task should do.
|
68
|
-
- `on_triggered`: What to do when a Task is `Triggered`.
|
69
|
-
- `on_waiting`: What to do when a Task is `Waiting`.
|
70
|
-
- `on_skipped`: What to do when a Task is `Skipped`.
|
71
|
-
- `on_started`: What to do when a Task is `Started`.
|
72
|
-
- `on_ready`: What to do when a Task is `Ready`.
|
73
|
-
- `on_retry`: What to do when a Task is `Retry`.
|
74
|
-
- `on_failed`: What to do when a Task is `Failed`.
|
75
|
-
- `should_execute`: Whether a Task should be `Started` or not (`Skipped`).
|
76
|
-
|
77
|
-
Finally, you can put related Tasks under the same `group`.
|
78
42
|
"""
|
79
43
|
|
80
44
|
__running_tasks: List[AnyTask] = []
|
@@ -503,10 +467,9 @@ class BaseTask(FinishTracker, AttemptTracker, Renderer, BaseTaskModel, AnyTask):
|
|
503
467
|
)
|
504
468
|
)
|
505
469
|
# set checker keyval
|
470
|
+
self._lock_checkers()
|
506
471
|
checker_coroutines = []
|
507
472
|
for checker_task in self._get_checkers():
|
508
|
-
checker_task.add_input(*self._get_inputs())
|
509
|
-
checker_task.add_env(*self._get_envs())
|
510
473
|
checker_coroutines.append(
|
511
474
|
asyncio.create_task(
|
512
475
|
checker_task._set_keyval(kwargs=new_kwargs, env_prefix=env_prefix)
|
@@ -65,6 +65,11 @@ class CommonTaskModel:
|
|
65
65
|
self._group = group
|
66
66
|
if group is not None:
|
67
67
|
group._add_task(self)
|
68
|
+
checkers_cp: List[AnyTask] = [checker.copy() for checker in checkers]
|
69
|
+
for checker in checkers_cp:
|
70
|
+
checker.add_env(*envs)
|
71
|
+
checker.add_env_file(*env_files)
|
72
|
+
checker.add_input(*inputs)
|
68
73
|
self._description = coalesce_str(description, name)
|
69
74
|
self._inputs = inputs
|
70
75
|
self._envs = envs
|
@@ -75,7 +80,7 @@ class CommonTaskModel:
|
|
75
80
|
self._retry_interval = retry_interval
|
76
81
|
self._upstreams = upstreams
|
77
82
|
self._fallbacks = fallbacks
|
78
|
-
self._checkers =
|
83
|
+
self._checkers = checkers_cp
|
79
84
|
self._checking_interval = checking_interval
|
80
85
|
self._run_function: Optional[Callable[..., Any]] = run
|
81
86
|
self._on_triggered = on_triggered
|
@@ -101,6 +106,9 @@ class CommonTaskModel:
|
|
101
106
|
self.__has_already_inject_fallbacks: bool = False
|
102
107
|
self.__all_inputs: Optional[List[AnyInput]] = None
|
103
108
|
|
109
|
+
def _lock_checkers(self):
|
110
|
+
self.__allow_add_checkers = False
|
111
|
+
|
104
112
|
def _lock_upstreams(self):
|
105
113
|
self.__allow_add_upstreams = False
|
106
114
|
|
@@ -164,11 +172,15 @@ class CommonTaskModel:
|
|
164
172
|
if not self.__allow_add_inputs:
|
165
173
|
raise Exception(f"Cannot insert inputs for `{self.get_name()}`")
|
166
174
|
self._inputs = list(inputs) + list(self._inputs)
|
175
|
+
for checker in self._get_checkers():
|
176
|
+
checker.insert_input(*inputs)
|
167
177
|
|
168
178
|
def add_input(self, *inputs: AnyInput):
|
169
179
|
if not self.__allow_add_inputs:
|
170
180
|
raise Exception(f"Cannot add inputs for `{self.get_name()}`")
|
171
181
|
self._inputs = list(self._inputs) + list(inputs)
|
182
|
+
for checker in self._get_checkers():
|
183
|
+
checker.add_input(*inputs)
|
172
184
|
|
173
185
|
def inject_inputs(self):
|
174
186
|
pass
|
@@ -219,11 +231,15 @@ class CommonTaskModel:
|
|
219
231
|
if not self.__allow_add_envs:
|
220
232
|
raise Exception(f"Cannot insert envs to `{self.get_name()}`")
|
221
233
|
self._envs = list(envs) + list(self._envs)
|
234
|
+
for checker in self._get_checkers():
|
235
|
+
checker.insert_env(*envs)
|
222
236
|
|
223
237
|
def add_env(self, *envs: Env):
|
224
238
|
if not self.__allow_add_envs:
|
225
239
|
raise Exception(f"Cannot add envs to `{self.get_name()}`")
|
226
240
|
self._envs = list(self._envs) + list(envs)
|
241
|
+
for checker in self._get_checkers():
|
242
|
+
checker.add_env(*envs)
|
227
243
|
|
228
244
|
def inject_envs(self):
|
229
245
|
pass
|
@@ -255,11 +271,15 @@ class CommonTaskModel:
|
|
255
271
|
if not self.__allow_add_env_files:
|
256
272
|
raise Exception(f"Cannot insert env_files to `{self.get_name()}`")
|
257
273
|
self._env_files = list(env_files) + list(self._env_files)
|
274
|
+
for checker in self._get_checkers():
|
275
|
+
checker.insert_env_file(*env_files)
|
258
276
|
|
259
277
|
def add_env_file(self, *env_files: EnvFile):
|
260
278
|
if not self.__allow_add_env_files:
|
261
279
|
raise Exception(f"Cannot add env_files to `{self.get_name()}`")
|
262
280
|
self._env_files = list(self._env_files) + list(env_files)
|
281
|
+
for checker in self._get_checkers():
|
282
|
+
checker.add_env_file(*env_files)
|
263
283
|
|
264
284
|
def inject_env_files(self):
|
265
285
|
pass
|
@@ -317,15 +337,26 @@ class CommonTaskModel:
|
|
317
337
|
def insert_checker(self, *checkers: AnyTask):
|
318
338
|
if not self.__allow_add_checkers:
|
319
339
|
raise Exception(f"Cannot insert checkers to `{self.get_name()}`")
|
320
|
-
additional_checkers =
|
340
|
+
additional_checkers = self.__complete_new_checkers(checkers)
|
321
341
|
self._checkers = additional_checkers + self._checkers
|
322
342
|
|
323
343
|
def add_checker(self, *checkers: AnyTask):
|
324
344
|
if not self.__allow_add_checkers:
|
325
345
|
raise Exception(f"Cannot add checkers to `{self.get_name()}`")
|
326
|
-
additional_checkers =
|
346
|
+
additional_checkers = self.__complete_new_checkers(checkers)
|
327
347
|
self._checkers = self._checkers + additional_checkers
|
328
348
|
|
349
|
+
def __complete_new_checkers(self, new_checkers: List[AnyTask]) -> List[AnyTask]:
|
350
|
+
"""
|
351
|
+
For internal use: copy and completing new checkers
|
352
|
+
"""
|
353
|
+
checkers: List[AnyTask] = [checker.copy() for checker in new_checkers]
|
354
|
+
for checker in checkers:
|
355
|
+
checker.add_input(*self._get_inputs())
|
356
|
+
checker.add_env(*self._get_envs())
|
357
|
+
checker.add_env_file(*self._get_env_files())
|
358
|
+
return checkers
|
359
|
+
|
329
360
|
def inject_checkers(self):
|
330
361
|
pass
|
331
362
|
|
zrb/task/cmd_task.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import asyncio
|
2
2
|
import atexit
|
3
|
+
import logging
|
3
4
|
import os
|
4
5
|
import pathlib
|
5
6
|
import signal
|
@@ -7,7 +8,7 @@ import subprocess
|
|
7
8
|
import sys
|
8
9
|
import time
|
9
10
|
|
10
|
-
from zrb.config.config import default_shell
|
11
|
+
from zrb.config.config import default_shell, logging_level
|
11
12
|
from zrb.helper.accessories.color import colored
|
12
13
|
from zrb.helper.log import logger
|
13
14
|
from zrb.helper.typecheck import typechecked
|
@@ -55,6 +56,18 @@ def _reset_stty():
|
|
55
56
|
_has_stty = False
|
56
57
|
|
57
58
|
|
59
|
+
def _log_error(message: Any):
|
60
|
+
if logging_level > logging.ERROR:
|
61
|
+
return
|
62
|
+
colored_message = colored(f"{message}", color="red", attrs=["bold"])
|
63
|
+
logger.error(colored_message, exc_info=True)
|
64
|
+
|
65
|
+
|
66
|
+
def _print_out_dark(message: Any):
|
67
|
+
message_str = f"{message}"
|
68
|
+
print(colored(message_str, attrs=["dark"]), file=sys.stderr)
|
69
|
+
|
70
|
+
|
58
71
|
CmdVal = Union[
|
59
72
|
JinjaTemplate,
|
60
73
|
Iterable[JinjaTemplate],
|
@@ -272,7 +285,7 @@ class CmdTask(BaseTask):
|
|
272
285
|
def __on_kill(self, signum: Any, frame: Any):
|
273
286
|
self._global_state.no_more_attempt = True
|
274
287
|
self._global_state.is_killed_by_signal = True
|
275
|
-
|
288
|
+
_print_out_dark(f"Getting signal {signum}")
|
276
289
|
for pid in self._pids:
|
277
290
|
self.__kill_by_pid(pid)
|
278
291
|
tasks = asyncio.all_tasks()
|
@@ -282,7 +295,7 @@ class CmdTask(BaseTask):
|
|
282
295
|
except Exception as e:
|
283
296
|
self.print_err(e)
|
284
297
|
time.sleep(0.3)
|
285
|
-
|
298
|
+
_print_out_dark(f"Exiting with signal {signum}")
|
286
299
|
sys.exit(signum)
|
287
300
|
|
288
301
|
def __on_exit(self):
|
@@ -297,20 +310,20 @@ class CmdTask(BaseTask):
|
|
297
310
|
process_ever_exists = False
|
298
311
|
if self.__is_process_exist(pid):
|
299
312
|
process_ever_exists = True
|
300
|
-
|
313
|
+
_print_out_dark(f"Send SIGTERM to process {pid}")
|
301
314
|
os.killpg(os.getpgid(pid), signal.SIGTERM)
|
302
315
|
time.sleep(0.3)
|
303
316
|
if self.__is_process_exist(pid):
|
304
|
-
|
317
|
+
_print_out_dark(f"Send SIGINT to process {pid}")
|
305
318
|
os.killpg(os.getpgid(pid), signal.SIGINT)
|
306
319
|
time.sleep(0.3)
|
307
320
|
if self.__is_process_exist(pid):
|
308
|
-
|
321
|
+
_print_out_dark(f"Send SIGKILL to process {pid}")
|
309
322
|
os.killpg(os.getpgid(pid), signal.SIGKILL)
|
310
323
|
if process_ever_exists:
|
311
|
-
|
324
|
+
_print_out_dark(f"Process {pid} is killed successfully")
|
312
325
|
except Exception:
|
313
|
-
|
326
|
+
_log_error(f"Cannot kill process {pid}")
|
314
327
|
|
315
328
|
def __is_process_exist(self, pid: int) -> bool:
|
316
329
|
try:
|
zrb/task/rsync_task.py
CHANGED
@@ -48,8 +48,8 @@ class RsyncTask(BaseRemoteCmdTask):
|
|
48
48
|
remote_configs: Iterable[RemoteConfig],
|
49
49
|
src: JinjaTemplate,
|
50
50
|
dst: JinjaTemplate,
|
51
|
-
|
52
|
-
|
51
|
+
src_is_remote: bool = False,
|
52
|
+
dst_is_remote: bool = True,
|
53
53
|
group: Optional[Group] = None,
|
54
54
|
inputs: Iterable[AnyInput] = [],
|
55
55
|
envs: Iterable[Env] = [],
|
@@ -77,8 +77,8 @@ class RsyncTask(BaseRemoteCmdTask):
|
|
77
77
|
preexec_fn: Optional[Callable[[], Any]] = os.setsid,
|
78
78
|
should_execute: Union[bool, str, Callable[..., bool]] = True,
|
79
79
|
):
|
80
|
-
parsed_src = self._get_parsed_path(
|
81
|
-
parsed_dst = self._get_parsed_path(
|
80
|
+
parsed_src = self._get_parsed_path(src_is_remote, src)
|
81
|
+
parsed_dst = self._get_parsed_path(dst_is_remote, dst)
|
82
82
|
cmd = f'auth_rsync "{parsed_src}" "{parsed_dst}"'
|
83
83
|
BaseRemoteCmdTask.__init__(
|
84
84
|
self,
|
zrb/task/server.py
CHANGED
@@ -129,7 +129,7 @@ class Server(BaseTask):
|
|
129
129
|
def __init__(
|
130
130
|
self,
|
131
131
|
name: str,
|
132
|
-
controllers:
|
132
|
+
controllers: Iterable[Controller],
|
133
133
|
group: Optional[Group] = None,
|
134
134
|
inputs: Iterable[AnyInput] = [],
|
135
135
|
envs: Iterable[Env] = [],
|
@@ -185,7 +185,7 @@ class Server(BaseTask):
|
|
185
185
|
should_execute=should_execute,
|
186
186
|
return_upstream_result=return_upstream_result,
|
187
187
|
)
|
188
|
-
self._controllers = controllers
|
188
|
+
self._controllers = list(controllers)
|
189
189
|
|
190
190
|
async def run(self, *args: Any, **kwargs: Any):
|
191
191
|
for controller in self._controllers:
|
zrb/task/task.py
CHANGED
@@ -18,30 +18,30 @@ class Task(BaseTask):
|
|
18
18
|
|
19
19
|
Moreover, you can define Task dependencies by specifying its `upstreams` or by using shift-right operator.
|
20
20
|
|
21
|
-
Every Task has its
|
22
|
-
- `Triggered`: The Task is triggered.
|
23
|
-
- `Waiting`: The Task is waiting for all
|
24
|
-
- `Skipped`:
|
25
|
-
- `Started`: The
|
26
|
-
- `Failed`:
|
27
|
-
- `Retry`: The task will
|
21
|
+
Every Zrb Task has its life-cycle state:
|
22
|
+
- `Triggered`: The Task is triggered (either by the user or by the other Task).
|
23
|
+
- `Waiting`: Zrb has already triggered the Task. The Task is now waiting for all its upstreams to be ready.
|
24
|
+
- `Skipped`: Task upstreams are ready, but the Task is not executed and will immediately enter the `Ready` state.
|
25
|
+
- `Started`: The upstreams are ready, and Zrb is now starting the Task execution.
|
26
|
+
- `Failed`: Zrb failed to execute the Task. It will enter the `Retry` state if the current attempt does not exceed the maximum attempt.
|
27
|
+
- `Retry`: The task has already entered the `Failed` state. Now, Zrb will try to start the Task execution.
|
28
28
|
- `Ready`: The task is ready.
|
29
29
|
|
30
30
|
There are several configurations related to Task's life cycle:
|
31
|
-
- `retry`:
|
32
|
-
- `retry_interval`:
|
33
|
-
- `fallbacks`:
|
31
|
+
- `retry`: Maximum retry attempt.
|
32
|
+
- `retry_interval`: The duration is to wait before Zrb starts the next attempt.
|
33
|
+
- `fallbacks`: Action to take if the Task has failed for good.
|
34
34
|
- `checkers`: How to determine if a Task is `Ready`.
|
35
|
-
- `checking_interval`:
|
36
|
-
- `run`:
|
37
|
-
- `on_triggered`:
|
38
|
-
- `on_waiting`:
|
39
|
-
- `on_skipped`:
|
40
|
-
- `on_started`:
|
41
|
-
- `on_ready`:
|
42
|
-
- `on_retry`:
|
43
|
-
- `on_failed`:
|
44
|
-
- `should_execute`:
|
35
|
+
- `checking_interval`: The duration to wait before Zrb checks for the Task's readiness.
|
36
|
+
- `run`: Action to do when Zrb executes the Task.
|
37
|
+
- `on_triggered`: Action to do when a Task is `Triggered`.
|
38
|
+
- `on_waiting`: Action to do when a Task is `Waiting`.
|
39
|
+
- `on_skipped`: Action to do when a Task is `Skipped`.
|
40
|
+
- `on_started`: Action to do when a Task is `Started`.
|
41
|
+
- `on_ready`: Action to do when a Task is `Ready`.
|
42
|
+
- `on_retry`: Action to do when a Task is `Retry`.
|
43
|
+
- `on_failed`: Action to do when a Task is `Failed`.
|
44
|
+
- `should_execute`: Condition to determine whether a Task should be `Started` or `Skipped`.
|
45
45
|
|
46
46
|
Finally, you can put related Tasks under the same `group`.
|
47
47
|
"""
|
@@ -1355,19 +1355,19 @@ zrb/shell-scripts/notify.ps1,sha256=6_xPoIwuxARpYljcjVV-iRJS3gJqGfx-B6kj719cJ9o,
|
|
1355
1355
|
zrb/shell-scripts/rsync-util.sh,sha256=QzdhSBvUNMxB4U2B4m0Dxg9czGckRjB7Vk4A1ObG0-k,353
|
1356
1356
|
zrb/shell-scripts/ssh-util.sh,sha256=9lXDzw6oO8HuA4vdbfps_uQMMwKyNYX9fZkZgpK52g8,401
|
1357
1357
|
zrb/task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1358
|
-
zrb/task/any_task.py,sha256=
|
1358
|
+
zrb/task/any_task.py,sha256=nKcCj_RbSC-MUSi4rxcIAC2eEFo7uKwODkgglxp3mj8,39346
|
1359
1359
|
zrb/task/any_task_event_handler.py,sha256=AjTC6lIcprutRusNBGl83EifQe4TbZzxdlVIR4ndWN4,524
|
1360
|
-
zrb/task/base_remote_cmd_task.py,sha256=
|
1360
|
+
zrb/task/base_remote_cmd_task.py,sha256=q2Kwo5OMahL5gPSxwp_9zZLYouFfFc6Ru_p6ApOI-pk,12124
|
1361
1361
|
zrb/task/base_task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1362
|
-
zrb/task/base_task/base_task.py,sha256=
|
1362
|
+
zrb/task/base_task/base_task.py,sha256=rPWMIBNnNtwn0q3VEUDw3HfbSPWtww_lyOA3rUh5aq0,20310
|
1363
1363
|
zrb/task/base_task/component/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1364
1364
|
zrb/task/base_task/component/base_task_model.py,sha256=i6TrtTusZ71ZnOnx8yM0aJl8uF6R1hKdAf62bEdpdCs,10379
|
1365
|
-
zrb/task/base_task/component/common_task_model.py,sha256=
|
1365
|
+
zrb/task/base_task/component/common_task_model.py,sha256=OaliFPkL9HQPuoMBsmmVkJ6xxyQd3GoTJS0u5LaVeNk,13538
|
1366
1366
|
zrb/task/base_task/component/pid_model.py,sha256=RjJIqOpavucDssnd3q3gT4q8QnP8I9SUdlv1b9pR7kU,292
|
1367
1367
|
zrb/task/base_task/component/renderer.py,sha256=9wP2IW811Ta81IoPWmeQ7yVc7eG-uaSnOVbEyeaOIuk,4439
|
1368
1368
|
zrb/task/base_task/component/trackers.py,sha256=c5xhZ6agICxKPI5Va1sn66_9OqC92ebF5CNhcwVUNUE,2074
|
1369
1369
|
zrb/task/checker.py,sha256=raYNBHgeyEqkyfBRsPPgSV7ukEfMlJOCUn97WQNl6mU,3384
|
1370
|
-
zrb/task/cmd_task.py,sha256=
|
1370
|
+
zrb/task/cmd_task.py,sha256=z20xSsFTjnMToTgORzToKRn8_AwubLC0Sm6b-3z58_c,14526
|
1371
1371
|
zrb/task/decorator.py,sha256=stxrl6aXbuUDK83lVf8m8uni3Ii6egLl0TCR0vxslUQ,3064
|
1372
1372
|
zrb/task/docker_compose_task.py,sha256=hUKF7W3GwxFuEWmlPPFxa7h8npEnig2sm7KjlidHFBI,14911
|
1373
1373
|
zrb/task/flow_task.py,sha256=QBOoyIrqc6ToSf3RF8xu8h4yxCWCerUAu2Ba0GxAqgg,5147
|
@@ -1381,9 +1381,9 @@ zrb/task/port_checker.py,sha256=Za02E0xzR7xvHEujxuPszaydJCpwl_hJa1S9U4j25XQ,4593
|
|
1381
1381
|
zrb/task/recurring_task.py,sha256=6JN7YkAY-NQ_zU2EAzqaQAxvfkGssbxvzNtL_foNA3Q,7434
|
1382
1382
|
zrb/task/remote_cmd_task.py,sha256=DzAt5Vq8YekqAfu9PflGP0XcdLWX_gLKI64dGVgtL6s,3954
|
1383
1383
|
zrb/task/resource_maker.py,sha256=wvq8Gv11epA_OYeLY071hIfFYkJ0rMcmcnXUAbd3TRg,7645
|
1384
|
-
zrb/task/rsync_task.py,sha256=
|
1385
|
-
zrb/task/server.py,sha256=
|
1386
|
-
zrb/task/task.py,sha256=
|
1384
|
+
zrb/task/rsync_task.py,sha256=4CB4AEvf8RoZOV2eTpMIH2h-b3cH_AqmcI4fv1Gln40,4190
|
1385
|
+
zrb/task/server.py,sha256=inWjVd8rSrSaH6W-0hn2xYCeJVtlGM8eePZtGm8z-Hs,6731
|
1386
|
+
zrb/task/task.py,sha256=iHDyUMUh1uVGlMCQdVewdT3epCOHKNRKblC3G1WSKS0,2493
|
1387
1387
|
zrb/task/time_watcher.py,sha256=D3_rr5Dlaw8xOg9iZMAGzPiEC2VDvIIvNTluQsZeBHo,5122
|
1388
1388
|
zrb/task/watcher.py,sha256=7yDAS7kxST4Gd_PLyg_7XU6uXed5qbojE-B5X5z9EY4,3344
|
1389
1389
|
zrb/task/wiki_task.py,sha256=Mcugk_6Pd7pzubi2ZP4eegJs8e9niYKh-9mCrNHXE_g,4330
|
@@ -1403,8 +1403,8 @@ zrb/task_input/int_input.py,sha256=d2fXcm5fCo09472eMAm6PdzLQD82ZBV9ARq5CjKepAo,4
|
|
1403
1403
|
zrb/task_input/password_input.py,sha256=g_g8ZWAzDaHx4h2EHY3UCGvTigC6esAUBzXU0T9nDUk,4192
|
1404
1404
|
zrb/task_input/str_input.py,sha256=BNflOhrJvST9bWK0rGdCi7C7y-QDvHj9ISQMRmujIWU,4200
|
1405
1405
|
zrb/task_input/task_input.py,sha256=DcHgKie5Oo1sUxj41t1ZQjCIK1aAfTgGzaKr7_ap7ZI,2248
|
1406
|
-
zrb-0.
|
1407
|
-
zrb-0.
|
1408
|
-
zrb-0.
|
1409
|
-
zrb-0.
|
1410
|
-
zrb-0.
|
1406
|
+
zrb-0.18.1.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
|
1407
|
+
zrb-0.18.1.dist-info/METADATA,sha256=RnbEITp7ykt9BYdrmFaPEX71dBHXmFfVvL3n8ble_jA,17076
|
1408
|
+
zrb-0.18.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
1409
|
+
zrb-0.18.1.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
|
1410
|
+
zrb-0.18.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|