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:
parent
5fc35faf17
commit
a13ed0c52e
2 changed files with 104 additions and 71 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue