Skip to content

Commit

Permalink
#4205: add flag for emitting potentially stale events (#4237)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Jul 13, 2023
1 parent 85bd784 commit 00ca1d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -77,6 +77,7 @@ exports[`should create default config 1`] = `
"disableNotifications": false,
"embedProxy": true,
"embedProxyFrontend": true,
"emitPotentiallyStaleEvents": false,
"featuresExportImport": true,
"googleAuthEnabled": false,
"maintenanceMode": false,
Expand Down Expand Up @@ -112,6 +113,7 @@ exports[`should create default config 1`] = `
"disableNotifications": false,
"embedProxy": true,
"embedProxyFrontend": true,
"emitPotentiallyStaleEvents": false,
"featuresExportImport": true,
"googleAuthEnabled": false,
"maintenanceMode": false,
Expand Down
8 changes: 7 additions & 1 deletion src/lib/types/experimental.ts
Expand Up @@ -26,7 +26,8 @@ export type IFlagKey =
| 'strategySplittedButton'
| 'strategyVariant'
| 'newProjectLayout'
| 'slackAppAddon';
| 'slackAppAddon'
| 'emitPotentiallyStaleEvents';

export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;

Expand Down Expand Up @@ -123,6 +124,11 @@ const flags: IFlags = {
process.env.UNLEASH_SLACK_APP_ADDON,
false,
),

emitPotentiallyStaleEvents: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_EMIT_POTENTIALLY_STALE_EVENTS,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down
1 change: 1 addition & 0 deletions src/server-dev.ts
Expand Up @@ -42,6 +42,7 @@ process.nextTick(async () => {
strategySplittedButton: true,
strategyVariant: true,
newProjectLayout: true,
emitPotentiallyStaleEvents: true,
},
},
authentication: {
Expand Down

0 comments on commit 00ca1d7

Please sign in to comment.