Skip to content

Commit

Permalink
Merge pull request #7973 from LedgerHQ/fix/ff-fetch-frequency
Browse files Browse the repository at this point in the history
Fetch feature flags every 5 minutes
  • Loading branch information
KVNLS authored Oct 2, 2024
2 parents 642c714 + 64d8546 commit f871795
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/strange-news-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": minor
"live-mobile": minor
---

Fetch FF every 5 minutes for LLM & LLD
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export const FirebaseRemoteConfigProvider = ({
}
};
fetchAndActivateConfig();
// 1 hour fetch interval. TODO: make this configurable
const intervalId = window.setInterval(fetchAndActivateConfig, 1 * 60 * 60 * 1000);
// 5 minutes fetch interval. TODO: make this configurable
const intervalId = window.setInterval(fetchAndActivateConfig, 5 * 60 * 1000);
return () => clearInterval(intervalId);
}, [setConfig]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const FirebaseRemoteConfigProvider = ({
}
};
fetchConfig();
// 1 hour fetch interval. TODO: make this configurable
const intervalId = setInterval(fetchConfig, 1 * 60 * 60 * 1000);
// 5 minutes fetch interval. TODO: make this configurable
const intervalId = setInterval(fetchConfig, 5 * 60 * 1000);
return () => {
clearInterval(intervalId);
unmounted = true;
Expand Down

0 comments on commit f871795

Please sign in to comment.