Skip to content

Commit af5ef7a

Browse files
jankeromneseasyCZ
authored andcommitted
[server][dashboard] Disable 5 second delay before returning feature flag value
Co-authored-by: Milan Pavlik <[email protected]>
1 parent 8fad588 commit af5ef7a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

components/dashboard/src/experiments/configcat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function newProductionConfigCatClient(): Client {
2323
// clientKey is an identifier of our ConfigCat application. It is not a secret.
2424
const clientKey = "WBLaCPtkjkqKHlHedziE9g/TwAe6YyftEGPnGxVRXd0Ig";
2525
const client = configcat.createClient(clientKey, {
26+
maxInitWaitTimeSeconds: 0,
2627
logger: configcat.createConsoleLogger(2),
2728
});
2829

@@ -35,6 +36,7 @@ export function newNonProductionConfigCatClient(): Client {
3536
// clientKey is an identifier of our ConfigCat application. It is not a secret.
3637
const clientKey = "WBLaCPtkjkqKHlHedziE9g/LEAOCNkbuUKiqUZAcVg7dw";
3738
const client = configcat.createClient(clientKey, {
39+
maxInitWaitTimeSeconds: 0,
3840
pollIntervalSeconds: 60 * 3, // 3 minutes
3941
logger: configcat.createConsoleLogger(3),
4042
});

components/server/src/experiments.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export function getExperimentsClient(): IConfigCatClient {
1414
if (client === undefined) {
1515
client = configcat.createClient("WBLaCPtkjkqKHlHedziE9g/LEAOCNkbuUKiqUZAcVg7dw", {
1616
// <-- This is the actual SDK Key for your Test environment
17+
maxInitWaitTimeSeconds: 0,
1718
logger: logger,
1819
});
1920
}

0 commit comments

Comments
 (0)