refactor: update log streaming so plugin triggers don't get abandoned on ctrl-c
We now propagate a cancellable context object on a new plugin trigger call that allows for signals to work as expected.
This commit is contained in:
1 parent
9c891563c3
commit
57b62f51d3
3 files changed
+30
-20
No files matched your search
@@ -25,10 +25,12 @@ func CommandDefault(appName string, num int64, process string, tail, quiet bool)
|
||||
q := strconv.FormatBool(quiet)
|
||||
n := strconv.FormatInt(num, 10)
|
||||
|
||||
if err := common.PlugnTrigger("scheduler-logs", []string{s, appName, process, t, q, n}...); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Args: []string{s, appName, process, t, q, n},
|
||||
StreamStdio: true,
|
||||
Trigger: "scheduler-logs",
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// CommandFailed shows the last failed deploy logs
|
||||
|
||||
Reference in new issue
Block a user