mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Only update mirror last update after successful sync (#2730)
This commit is contained in:
		@@ -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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user