mirror of
https://gitee.com/gitea/gitea
synced 2026-01-06 15:45:47 +08:00
Fix status table race condition (#1835)
This commit is contained in:
@@ -202,10 +202,9 @@ func DeleteMirrorByRepoID(repoID int64) error {
|
||||
|
||||
// MirrorUpdate checks and updates mirror repositories.
|
||||
func MirrorUpdate() {
|
||||
if taskStatusTable.IsRunning(mirrorUpdate) {
|
||||
if !taskStatusTable.StartIfNotRunning(mirrorUpdate) {
|
||||
return
|
||||
}
|
||||
taskStatusTable.Start(mirrorUpdate)
|
||||
defer taskStatusTable.Stop(mirrorUpdate)
|
||||
|
||||
log.Trace("Doing: MirrorUpdate")
|
||||
|
||||
Reference in New Issue
Block a user