From 1844ab7c83e440754f593b22242465bad0a81358 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Fri, 24 May 2024 12:45:58 +0100 Subject: [PATCH] feat(spiff-workflow)_: disable store nodes for spiffy workfluffy --- cmd/spiff-workflow/main.go | 4 +++- protocol/messenger_mailserver.go | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/spiff-workflow/main.go b/cmd/spiff-workflow/main.go index ee1eff1fb..b5693fd4e 100644 --- a/cmd/spiff-workflow/main.go +++ b/cmd/spiff-workflow/main.go @@ -154,6 +154,8 @@ func main() { wakuext := waku2extn.NewPublicAPI(wakuextservice) + messenger := wakuext.Messenger() + messenger.DisableStoreNodes() // This will start the push notification server as well as // the config is set to Enabled _, err = wakuext.StartMessenger() @@ -162,7 +164,7 @@ func main() { return } - retrieveMessagesLoop(wakuext.Messenger(), 300*time.Millisecond) + retrieveMessagesLoop(messenger, 300*time.Millisecond) } diff --git a/protocol/messenger_mailserver.go b/protocol/messenger_mailserver.go index eab644f5a..894b724e6 100644 --- a/protocol/messenger_mailserver.go +++ b/protocol/messenger_mailserver.go @@ -835,6 +835,10 @@ loop: return result } +func (m *Messenger) DisableStoreNodes() { + m.featureFlags.StoreNodesDisabled = true +} + func (m *Messenger) processMailserverBatch(ms mailservers.Mailserver, batch MailserverBatch) error { if m.featureFlags.StoreNodesDisabled { return nil