Skip to content

Commit

Permalink
Fix how to add to queue (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkm4ntr authored and k8s-ci-robot committed Apr 8, 2019
1 parent 319bae1 commit ffb93cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
17 changes: 0 additions & 17 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/controllers/mpi_job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ func (c *MPIJobController) processNextWorkItem() bool {
// Run the syncHandler, passing it the namespace/name string of the
// MPIJob resource to be synced.
if err := c.syncHandler(key); err != nil {
c.queue.AddRateLimited(key)
return fmt.Errorf("error syncing '%s': %s", key, err.Error())
}
// Finally, if no error occurs we Forget this item so it does not
Expand Down Expand Up @@ -803,7 +804,7 @@ func (c *MPIJobController) enqueueMPIJob(obj interface{}) {
runtime.HandleError(err)
return
}
c.queue.AddRateLimited(key)
c.queue.Add(key)
}

// handleObject will take any resource implementing metav1.Object and attempt
Expand Down

0 comments on commit ffb93cb

Please sign in to comment.