From 730f4c072a3b01b0ab8b78e0658983974d0eed76 Mon Sep 17 00:00:00 2001 From: Matee ullah Date: Fri, 9 Aug 2024 18:51:22 +0500 Subject: [PATCH] [PSL-1238] initiate migration worker --- p2p/kademlia/store/sqlite/sqlite.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/p2p/kademlia/store/sqlite/sqlite.go b/p2p/kademlia/store/sqlite/sqlite.go index 1b4299dbe..f840df4a4 100644 --- a/p2p/kademlia/store/sqlite/sqlite.go +++ b/p2p/kademlia/store/sqlite/sqlite.go @@ -164,6 +164,13 @@ func NewStore(ctx context.Context, dataDir string, _ time.Duration, _ time.Durat // Run WAL checkpoint worker every 5 seconds go s.startCheckpointWorker(ctx) + if s.isCloudBackupOn() { + _, err = NewMigrationMetaStore(ctx, dataDir, cloud) + if err != nil { + return nil, fmt.Errorf("cannot create meta store: %w", err) + } + } + return s, nil }