mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 23:30:29 +00:00
chore(runner): wait workflow done before shutdown the service
This commit is contained in:
1 parent
cbd21b8ec5
commit
d1114da299
2 files changed
+8
-4
No files matched your search
@@ -138,6 +138,9 @@ func runDaemon(ctx context.Context, envFile string) func(cmd *cobra.Command, arg
|
||||
})
|
||||
|
||||
g.Go(func() error {
|
||||
// wait all workflows done.
|
||||
poller.Wait()
|
||||
// received the shutdown signal
|
||||
<-ctx.Done()
|
||||
log.Infoln("update runner status to offline")
|
||||
_, err := cli.UpdateRunner(
|
||||
|
||||
Reference in new issue
Block a user