1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-06-27 16:35:58 +00:00

feat(poller): support scheduler to fetch task and dispatch to worker

This commit is contained in:
Bo-Yi Wu 2022-11-17 10:49:32 +08:00 committed by Jason Song
parent 5fc35faf17
commit a13ed0c52e
2 changed files with 104 additions and 71 deletions

View file

@ -59,6 +59,7 @@ func runDaemon(ctx context.Context, envFile string) func(cmd *cobra.Command, arg
poller := poller.New(
cli,
runner.Run,
cfg.Runner.Capacity,
)
g.Go(func() error {
@ -81,7 +82,7 @@ func runDaemon(ctx context.Context, envFile string) func(cmd *cobra.Command, arg
Errorln("failed to update runner")
}
return poller.Poll(ctx, cfg.Runner.Capacity)
return poller.Poll(ctx)
})
g.Go(func() error {