Increase fetch interval for Codeberg

Increase the fetch interval to at least 30 seconds if the runner is
configured to be used with Codeberg. This avoids it being rate limited
when they do actual work and reduces load on Codeberg.
This commit is contained in:
Gusted 2024-01-05 15:07:15 +00:00 committed by Gusted
parent fd0596cd15
commit db2213254d
No known key found for this signature in database
GPG key ID: FD821B732837125F
3 changed files with 49 additions and 0 deletions

View file

@ -45,6 +45,8 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command,
return fmt.Errorf("failed to load registration file: %w", err)
}
cfg.Tune(reg.Address)
lbls := reg.Labels
if len(cfg.Runner.Labels) > 0 {
lbls = cfg.Runner.Labels