Add live activity progress and logs
This commit is contained in:
1 parent
5a1b9588e1
commit
3e3c63070e
14 files changed
+254
-38
No files matched your search
@@ -141,6 +141,16 @@ func (q *Queue) Snapshot() []model.Run {
|
||||
return q.snapshotLocked()
|
||||
}
|
||||
|
||||
func (q *Queue) UpdateActive(id string, update func(*model.Run)) bool {
|
||||
q.mu.Lock()
|
||||
defer q.mu.Unlock()
|
||||
if q.active == nil || q.active.ID != id {
|
||||
return false
|
||||
}
|
||||
update(q.active)
|
||||
return true
|
||||
}
|
||||
|
||||
func (q *Queue) snapshotLocked() []model.Run {
|
||||
result := append([]model.Run{}, q.history...)
|
||||
if q.active != nil {
|
||||
|
||||
Reference in new issue
Block a user