You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/17 09:04:58 UTC

[GitHub] [apisix-ingress-controller] gxthrj commented on a change in pull request #103: fix: add item to workqueue with delay when syncFailed

gxthrj commented on a change in pull request #103:
URL: https://github.com/apache/apisix-ingress-controller/pull/103#discussion_r544922194



##########
File path: pkg/ingress/controller/apisix_route.go
##########
@@ -144,6 +144,7 @@ func (c *ApisixRouteController) processNextWorkItem() bool {
 		}
 		// 在syncHandler中处理业务
 		if err := c.syncHandler(rqo); err != nil {
+			c.workqueue.AddRateLimited(obj)

Review comment:
       Done

##########
File path: pkg/ingress/controller/apisix_service.go
##########
@@ -89,16 +95,15 @@ func (c *ApisixServiceController) processNextWorkItem() bool {
 	}
 	err := func(obj interface{}) error {
 		defer c.workqueue.Done(obj)
-		var key string
+		var sqo *ServiceQueueObj
 		var ok bool
-
-		if key, ok = obj.(string); !ok {
+		if sqo, ok = obj.(*ServiceQueueObj); !ok {
 			c.workqueue.Forget(obj)
 			return fmt.Errorf("expected string in workqueue but got %#v", obj)

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org