feat(spiff-workflow)_: disable store nodes for spiffy workfluffy

This commit is contained in:
Andrea Maria Piana 2024-05-24 12:45:58 +01:00 committed by Jakub Sokołowski
parent 9901ac9b9d
commit 1844ab7c83
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 7 additions and 1 deletions

View File

@ -154,6 +154,8 @@ func main() {
wakuext := waku2extn.NewPublicAPI(wakuextservice) wakuext := waku2extn.NewPublicAPI(wakuextservice)
messenger := wakuext.Messenger()
messenger.DisableStoreNodes()
// This will start the push notification server as well as // This will start the push notification server as well as
// the config is set to Enabled // the config is set to Enabled
_, err = wakuext.StartMessenger() _, err = wakuext.StartMessenger()
@ -162,7 +164,7 @@ func main() {
return return
} }
retrieveMessagesLoop(wakuext.Messenger(), 300*time.Millisecond) retrieveMessagesLoop(messenger, 300*time.Millisecond)
} }

View File

@ -835,6 +835,10 @@ loop:
return result return result
} }
func (m *Messenger) DisableStoreNodes() {
m.featureFlags.StoreNodesDisabled = true
}
func (m *Messenger) processMailserverBatch(ms mailservers.Mailserver, batch MailserverBatch) error { func (m *Messenger) processMailserverBatch(ms mailservers.Mailserver, batch MailserverBatch) error {
if m.featureFlags.StoreNodesDisabled { if m.featureFlags.StoreNodesDisabled {
return nil return nil