镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-06 06:26:46 +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
这个提交包含在:
@@ -47,6 +47,9 @@ type globalConfig struct {
|
||||
MirrorDir string `toml:"mirror_dir"`
|
||||
Concurrent int `toml:"concurrent"`
|
||||
Interval int `toml:"interval"`
|
||||
|
||||
ExecOnSuccess []string `toml:"exec_on_success"`
|
||||
ExecOnFailure []string `toml:"exec_on_failure"`
|
||||
}
|
||||
|
||||
type managerConfig struct {
|
||||
@@ -87,8 +90,13 @@ type mirrorConfig struct {
|
||||
Env map[string]string `toml:"env"`
|
||||
Role string `toml:"role"`
|
||||
|
||||
ExecOnSuccess string `toml:"exec_on_success"`
|
||||
ExecOnFailure string `toml:"exec_on_failure"`
|
||||
// These two options over-write the global options
|
||||
ExecOnSuccess []string `toml:"exec_on_success"`
|
||||
ExecOnFailure []string `toml:"exec_on_failure"`
|
||||
|
||||
// These two options the global options
|
||||
ExecOnSuccessExtra []string `toml:"exec_on_success_extra"`
|
||||
ExecOnFailureExtra []string `toml:"exec_on_failure_extra"`
|
||||
|
||||
Command string `toml:"command"`
|
||||
UseIPv6 bool `toml:"use_ipv6"`
|
||||
|
||||
在新工单中引用
屏蔽一个用户