admin: Refactor synchronization status report + display last git error
This commit is contained in:
parent
c1924c0e92
commit
03d02669ea
6 changed files with 81 additions and 49 deletions
|
@ -24,6 +24,22 @@ var oneThemeDeepSync sync.Mutex
|
|||
// DeepSyncProgress expose the progression of the depp synchronization (0 = 0%, 255 = 100%).
|
||||
var DeepSyncProgress uint8
|
||||
|
||||
func OneDeepSyncStatus() bool {
|
||||
if oneDeepSync.TryLock() {
|
||||
oneDeepSync.Unlock()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func OneThemeDeepSyncStatus() bool {
|
||||
if oneThemeDeepSync.TryLock() {
|
||||
oneThemeDeepSync.Unlock()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type SyncReport struct {
|
||||
DateStart time.Time `json:"_started"`
|
||||
DateEnd time.Time `json:"_ended"`
|
||||
|
|
Reference in a new issue