Skip to content

Commit

Permalink
Merge pull request #7 from avi-biton/requeue
Browse files Browse the repository at this point in the history
update Requeue to RequeueAfter 3 seconds
  • Loading branch information
avi-biton authored Jul 18, 2024
2 parents 729534f + 5ddadf2 commit b1db220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/controller/notificationservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package controller
import (
"context"
"fmt"
"time"

"github.com/go-logr/logr"
"github.com/konflux-ci/notification-service/pkg/notifier"
Expand Down Expand Up @@ -80,7 +81,7 @@ func (r *NotificationServiceReconciler) Reconcile(ctx context.Context, req ctrl.
err = r.Notifier.Notify(ctx, string(results))
if err != nil {
logger.Error(err, "Failed to Notify")
return ctrl.Result{Requeue: true}, err
return ctrl.Result{RequeueAfter: 3 * time.Second}, err
}
fmt.Printf("Results for pipelinerun %s are: %s\n", pipelineRun.Name, results)
err = AddAnnotationToPipelineRun(ctx, pipelineRun, r, NotificationPipelineRunAnnotation, NotificationPipelineRunAnnotationValue)
Expand Down

0 comments on commit b1db220

Please sign in to comment.