snapshot: Lock instances before making snapshot

This commit is contained in:
Tom Wiesing 2022-10-12 16:18:14 +02:00
parent f1c5d518c2
commit 5e7c5b2d23
No known key found for this signature in database
11 changed files with 167 additions and 0 deletions

View file

@ -16,6 +16,8 @@ type WissKIInfo struct {
Slug string // slug
URL string // complete URL, including http(s)
Locked bool // Is this instance currently locked?
// Information about the running instance
Running bool
LastRebuild time.Time
@ -48,6 +50,12 @@ func (wisski *WissKI) Info(quick bool) (info WissKIInfo, err error) {
return
})
// quick check if this instance is locked
group.Go(func() (err error) {
info.Locked = wisski.IsLocked()
return nil
})
// slower checks for extra properties.
// these might execute php code or require additional database queries.
if !quick {