Browse Source

Only update mirror last update after successful sync (#2730)

tags/v1.3.0-rc1
Jonas Bröms Lauris BH 8 years ago
parent
commit
448a238cf7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      models/repo_mirror.go

+ 2
- 1
models/repo_mirror.go View File

@@ -50,7 +50,7 @@ func (m *Mirror) BeforeInsert() {
// BeforeUpdate is invoked from XORM before updating this object.
func (m *Mirror) BeforeUpdate() {
if m != nil {
m.UpdatedUnix = time.Now().Unix()
m.UpdatedUnix = m.Updated.Unix()
m.NextUpdateUnix = m.NextUpdate.Unix()
}
}
@@ -179,6 +179,7 @@ func (m *Mirror) runSync() bool {
}
}

m.Updated = time.Now()
return true
}



Loading…
Cancel
Save