Skip to content

Commit

Permalink
fix: use a single job instance for pull playbook actions
Browse files Browse the repository at this point in the history
this is to maintain retention
  • Loading branch information
adityathebe committed Nov 20, 2024
1 parent 22d801e commit 0d204b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jobs/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ var agentJobs = []*job.Job{
}

func RunPullPlaybookActionsJob(ctx context.Context) {
// use a single job instance to maintain retention
job := PullPlaybookActions(ctx)

for {
job := PullPlaybookActions(ctx)
backoff := retry.WithMaxRetries(10, retry.NewExponential(time.Second))
_ = retry.Do(ctx, backoff, func(_ctx gocontext.Context) error {
job.Run()
Expand Down

0 comments on commit 0d204b6

Please sign in to comment.