From 96ed73d2137ca68b23b397ae13ac8736627e4947 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 2 Sep 2024 21:52:03 +0200 Subject: [PATCH] Implement network checker for nodeconfsource --- nodeconfsource/source.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nodeconfsource/source.go b/nodeconfsource/source.go index 894535d..a4f34ed 100644 --- a/nodeconfsource/source.go +++ b/nodeconfsource/source.go @@ -3,14 +3,16 @@ package nodeconfsource import ( "context" "fmt" - "github.com/anyproto/any-sync-coordinator/db" + "time" + "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/nodeconf" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "time" + + "github.com/anyproto/any-sync-coordinator/db" ) const collName = "nodeConf" @@ -69,6 +71,10 @@ func (n *nodeConfSource) GetLast(ctx context.Context, currentId string) (c nodec }, nil } +func (n *nodeConfSource) IsNetworkNeedsUpdate(ctx context.Context) (bool, error) { + return false, nil +} + func (n *nodeConfSource) Add(conf nodeconf.Configuration, enable bool) (id string, err error) { if conf.NetworkId == "" { return "", fmt.Errorf("network id not specified")