Skip to content

Commit

Permalink
Fix the sync#i0 default values for the schedule and sync_max_delay ke…
Browse files Browse the repository at this point in the history
…ywords

The keyword default values were used instead of the specific (shorter) sync#i0
defaults.

(cherry picked from commit 510d570)
  • Loading branch information
cvaroqui authored and cgalibern committed Nov 10, 2021
1 parent 0ab71e9 commit 6da5322
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion opensvc/core/objects/builder.py
Expand Up @@ -169,12 +169,19 @@ def add_file(flist, fpath):
kwargs["options"] += svc.conf_get(kwargs["rid"], "options")
except ex.OptNotFound:
pass
try:
kwargs["schedule"] = svc.conf_get(kwargs["rid"], "schedule")
except ex.OptNotFound:
kwargs["schedule"] = "@60m"
try:
kwargs["sync_max_delay"] = svc.conf_get(kwargs["rid"], "sync_max_delay")
except ex.OptNotFound:
kwargs["sync_max_delay"] = 3660
kwargs["reset_options"] = svc.oget(kwargs["rid"], "reset_options")
kwargs["target"] = list(target)
kwargs["internal"] = True
kwargs["disabled"] = get_disabled(svc, kwargs["rid"])
kwargs["optional"] = get_optional(svc, kwargs["rid"])
kwargs.update(sync_kwargs(svc, kwargs["rid"]))
r = mod.SyncRsync(**kwargs)
svc += r

Expand Down

0 comments on commit 6da5322

Please sign in to comment.