Skip to content

Commit

Permalink
revert requeue time
Browse files Browse the repository at this point in the history
Signed-off-by: Manabu McCloskey <[email protected]>
  • Loading branch information
nabuskey committed May 2, 2024
1 parent 83508de commit 1096b38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/gitrepository/git_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type GiteaClient interface {
SetContext(ctx context.Context)
}

type gitHubClientI interface {
type gitHubClient interface {
getRepo(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error)
createRepo(ctx context.Context, owner string, req *github.Repository) (*github.Repository, *github.Response, error)
setToken(token string) error
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/gitrepository/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (g *ghClient) setToken(token string) error {
type gitHubProvider struct {
client.Client
Scheme *runtime.Scheme
gitHubClient gitHubClientI
gitHubClient gitHubClient
config util.CorePackageTemplateConfig
}

Expand Down Expand Up @@ -106,7 +106,7 @@ func (g *gitHubProvider) updateRepoContent(ctx context.Context, repo *v1alpha1.G
return updateRepoContent(ctx, repo, repoInfo, creds, g.Scheme, g.config)
}

func newGitHubClient(httpClient *http.Client) gitHubClientI {
func newGitHubClient(httpClient *http.Client) gitHubClient {
return &ghClient{
c: github.NewClient(httpClient),
}
Expand Down
6 changes: 5 additions & 1 deletion pkg/controllers/localbuild/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const (
defaultArgoCDProjectName string = "default"
)

var (
defaultRequeueTime = time.Second * 30
)

type LocalbuildReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand Down Expand Up @@ -151,7 +155,7 @@ func (r *LocalbuildReconciler) ReconcileArgoAppsWithGitea(ctx context.Context, r
}
r.shouldShutdown = shutdown

return ctrl.Result{RequeueAfter: time.Second * 15}, nil
return ctrl.Result{RequeueAfter: defaultRequeueTime}, nil
}

func (r *LocalbuildReconciler) reconcileEmbeddedApp(ctx context.Context, appName string, resource *v1alpha1.Localbuild) (ctrl.Result, error) {
Expand Down

0 comments on commit 1096b38

Please sign in to comment.