Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional tests #663

Merged
merged 15 commits into from
Aug 14, 2024
Prev Previous commit
Next Next commit
timeout to timeoutSec
  • Loading branch information
yohamta committed Aug 13, 2024
commit 64270f23f2e18f38e691d5d1318f790fba20e4eb
4 changes: 2 additions & 2 deletions docs/source/yaml_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ This section provides a comprehensive list of available fields that can be used
- ``logDir``: The directory where the standard output is written. The default value is ``${HOME}/.local/share/logs``.
- ``restartWaitSec``: The number of seconds to wait after the DAG process stops before restarting it.
- ``histRetentionDays``: The number of days to retain execution history (not for log files).
- ``timeout``: The timeout of the DAG, which is optional. Unit is seconds.
- ``timeoutSec``: The timeout of the DAG, which is optional. Unit is seconds.
- ``delaySec``: The interval time in seconds between steps.
- ``maxActiveRuns``: The maximum number of parallel running steps.
- ``params``: The default parameters that can be referred to by ``$1``, ``$2``, and so on.
Expand All @@ -344,7 +344,7 @@ Example:
logDir: ${LOG_DIR}
restartWaitSec: 60
histRetentionDays: 3
timeout: 3600
timeoutSec: 3600
delaySec: 1
maxActiveRuns: 1
params: param1 param2
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/testdata/timeout.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
timeout: 2
timeoutSec: 2
steps:
- name: "1"
command: "sleep 1"
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (b *builder) build(def *definition, envs []string) (*DAG, error) {
Name: def.Name,
Group: def.Group,
Description: def.Description,
Timeout: time.Second * time.Duration(def.Timeout),
Timeout: time.Second * time.Duration(def.TimeoutSec),
Delay: time.Second * time.Duration(def.DelaySec),
RestartWait: time.Second * time.Duration(def.RestartWaitSec),
Tags: parseTags(def.Tags),
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type definition struct {
MailOn *mailOnDef
ErrorMail mailConfigDef
InfoMail mailConfigDef
Timeout int
TimeoutSec int
DelaySec int
RestartWaitSec int
HistRetentionDays *int
Expand Down