tokers commented on a change in pull request #601:
URL:
https://github.com/apache/apisix-ingress-controller/pull/601#discussion_r674454391
##########
File path: pkg/apisix/cluster.go
##########
@@ -136,6 +138,9 @@ func newCluster(o *ClusterOptions) (Cluster, error) {
go c.syncCache()
+ ticker := time.NewTicker(o.SyncInterval)
Review comment:
Since this ticker is used by `syncSchema`, just created it inside it.
##########
File path: pkg/apisix/cluster_test.go
##########
@@ -20,6 +20,7 @@ import (
"testing"
v1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
+
Review comment:
Ditto.
##########
File path: pkg/apisix/plugin.go
##########
@@ -17,7 +17,9 @@ package apisix
import (
"context"
+
"github.com/apache/apisix-ingress-controller/pkg/log"
Review comment:
Put local packages at the bottom of the import block.
##########
File path: pkg/apisix/cluster.go
##########
@@ -136,6 +138,9 @@ func newCluster(o *ClusterOptions) (Cluster, error) {
go c.syncCache()
+ ticker := time.NewTicker(o.SyncInterval)
Review comment:
Also, ticker should be closed explicitly.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]