镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-06 06:26:46 +00:00
Add MirrorStatus.LastStarted property
- status.Status is in PreSyncing, and - curStatus.Status is not in PreSyncing
这个提交包含在:
@@ -297,14 +297,21 @@ func (s *Manager) updateJobOfWorker(c *gin.Context) {
|
||||
|
||||
curStatus, _ := s.adapter.GetMirrorStatus(workerID, mirrorName)
|
||||
|
||||
curTime := time.Now()
|
||||
|
||||
if status.Status == PreSyncing && curStatus.Status != PreSyncing {
|
||||
status.LastStarted = curTime
|
||||
} else {
|
||||
status.LastStarted = curStatus.LastStarted
|
||||
}
|
||||
// Only successful syncing needs last_update
|
||||
if status.Status == Success {
|
||||
status.LastUpdate = time.Now()
|
||||
status.LastUpdate = curTime
|
||||
} else {
|
||||
status.LastUpdate = curStatus.LastUpdate
|
||||
}
|
||||
if status.Status == Success || status.Status == Failed {
|
||||
status.LastEnded = time.Now()
|
||||
status.LastEnded = curTime
|
||||
} else {
|
||||
status.LastEnded = curStatus.LastEnded
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户