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 {