mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 20:26:19 +01:00
Only update mirror last update after successful sync (#2730)
This commit is contained in:
parent
30afce1523
commit
847272a70d
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,7 @@ func (m *Mirror) BeforeInsert() {
|
||||||
// BeforeUpdate is invoked from XORM before updating this object.
|
// BeforeUpdate is invoked from XORM before updating this object.
|
||||||
func (m *Mirror) BeforeUpdate() {
|
func (m *Mirror) BeforeUpdate() {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
m.UpdatedUnix = time.Now().Unix()
|
m.UpdatedUnix = m.Updated.Unix()
|
||||||
m.NextUpdateUnix = m.NextUpdate.Unix()
|
m.NextUpdateUnix = m.NextUpdate.Unix()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,6 +179,7 @@ func (m *Mirror) runSync() bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m.Updated = time.Now()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue