镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-06 06:26:46 +00:00
feature(worker): job need to be started by jobStart signal
这个提交包含在:
@@ -28,6 +28,7 @@ type jobMessage struct {
|
||||
type mirrorJob struct {
|
||||
provider mirrorProvider
|
||||
ctrlChan chan ctrlAction
|
||||
stopped chan empty
|
||||
enabled bool
|
||||
}
|
||||
|
||||
@@ -35,7 +36,7 @@ func newMirrorJob(provider mirrorProvider) *mirrorJob {
|
||||
return &mirrorJob{
|
||||
provider: provider,
|
||||
ctrlChan: make(chan ctrlAction, 1),
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +53,9 @@ func (m *mirrorJob) Name() string {
|
||||
// TODO: message struct for managerChan
|
||||
func (m *mirrorJob) Run(managerChan chan<- jobMessage, semaphore chan empty) error {
|
||||
|
||||
m.stopped = make(chan empty)
|
||||
defer close(m.stopped)
|
||||
|
||||
provider := m.provider
|
||||
|
||||
// to make code shorter
|
||||
|
||||
在新工单中引用
屏蔽一个用户