1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 15:06:47 +00:00

feat(worker): added global exec_on_success and exec_on_failure options

if `exec_on_success` is set on mirror-level config, it overrides the global option; if on mirror

level, extra hook cmd is needed, use `exec_on_success_extra` option
这个提交包含在:
bigeagle
2016-10-21 01:20:31 +08:00
父节点 83fc766147
当前提交 2b83ea4b45
共有 3 个文件被更改,包括 41 次插入18 次删除

查看文件

@@ -36,7 +36,9 @@ provider = "command"
upstream = "https://aosp.google.com/"
interval = 720
mirror_dir = "/data/git/AOSP"
exec_on_success = "bash -c 'echo ${TUNASYNC_JOB_EXIT_STATUS} > ${TUNASYNC_WORKING_DIR}/exit_status'"
exec_on_success = [
"bash -c 'echo ${TUNASYNC_JOB_EXIT_STATUS} > ${TUNASYNC_WORKING_DIR}/exit_status'"
]
[mirrors.env]
REPO = "/usr/local/bin/aosp-repo"
@@ -53,7 +55,9 @@ provider = "rsync"
upstream = "rsync://ftp.fedoraproject.org/fedora/"
use_ipv6 = true
exclude_file = "/etc/tunasync.d/fedora-exclude.txt"
exec_on_failure = "bash -c 'echo ${TUNASYNC_JOB_EXIT_STATUS} > ${TUNASYNC_WORKING_DIR}/exit_status'"
exec_on_failure = [
"bash -c 'echo ${TUNASYNC_JOB_EXIT_STATUS} > ${TUNASYNC_WORKING_DIR}/exit_status'"
]
`
Convey("When giving invalid file", t, func() {