do_nothing feature flag (#6712)
This commit is contained in:
1 parent
0ea263c1b1
commit
8d2ee1dffb
2 files changed
+9
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { Logger } from "@/services/logging/Logger"
|
||||
import { FEATURE_FLAGS, FeatureFlag } from "@/shared/services/feature-flags/feature-flags"
|
||||
import type { IFeatureFlagsProvider } from "./providers/IFeatureFlagsProvider"
|
||||
|
||||
@@ -34,6 +35,9 @@ export class FeatureFlagsService {
|
||||
const flagEnabled = await this.getFeatureFlag(flag).catch(() => false)
|
||||
this.cache.set(flag, flagEnabled === true)
|
||||
}
|
||||
|
||||
// Print DO_NOTHING flag status after polling
|
||||
Logger.log(`do_nothing flag: ${this.getDoNothingFlag()}`)
|
||||
}
|
||||
|
||||
private async getFeatureFlag(flagName: FeatureFlag): Promise<boolean> {
|
||||
@@ -86,6 +90,10 @@ export class FeatureFlagsService {
|
||||
return this.getBooleanFlagEnabled(FeatureFlag.WORKOS_AUTH, false)
|
||||
}
|
||||
|
||||
public getDoNothingFlag(): boolean {
|
||||
return this.getBooleanFlagEnabled(FeatureFlag.DO_NOTHING, false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the feature flag payload for advanced use cases
|
||||
* @param flagName The feature flag key
|
||||
|
||||
@@ -5,6 +5,7 @@ export enum FeatureFlag {
|
||||
FOCUS_CHAIN_CHECKLIST = "focus_chain_checklist",
|
||||
MULTI_ROOT_WORKSPACE = "multi_root_workspace",
|
||||
WORKOS_AUTH = "workos_auth",
|
||||
DO_NOTHING = "do_nothing",
|
||||
}
|
||||
|
||||
export const FEATURE_FLAGS = Object.values(FeatureFlag)
|
||||
Reference in new issue
Block a user