summaryrefslogtreecommitdiff
path: root/pkg/gui/queuehandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/queuehandler.go')
-rw-r--r--pkg/gui/queuehandler.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/gui/queuehandler.go b/pkg/gui/queuehandler.go
index cec6f8b..a814c47 100644
--- a/pkg/gui/queuehandler.go
+++ b/pkg/gui/queuehandler.go
@@ -12,13 +12,17 @@ func (gui *Gui) startQueue(g *gocui.Gui, v *gocui.View) error {
go func(gui_go *Gui, g_go *gocui.Gui) {
for {
job, finished, err := gui_go.State.Queue.StartNext()
+ // for each job execution we better refresh the main
+ // it would be nice if we can also refresh side views
g_go.Update(func(gu *gocui.Gui) error {
gui_go.refreshMain(gu)
return nil
})
- defer gui.updateKeyBindingsView(g, mainViewFeature.Name)
+
if err != nil {
if err == git.ErrAuthenticationRequired {
+ // pause the job, so it will be indicated to being blocking
+ job.Entity.State = git.Paused
err := gui_go.openAuthenticationView(g, gui_go.State.Queue, job, v.Name())
if err != nil {
log.Warn(err.Error())
@@ -26,7 +30,9 @@ func (gui *Gui) startQueue(g *gocui.Gui, v *gocui.View) error {
}
}
return
+ // with not returning here, we simply ignore and continue
}
+ // if queue is finished simply return from this goroutine
if finished {
return
}