MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / is_bad_key

Method is_bad_key

api/environments/models.py:489–494  ·  view source on GitHub ↗
(environment_key: str)

Source from the content-addressed store, hash-verified

487
488 @staticmethod
489 def is_bad_key(environment_key: str) -> bool:
490 return (
491 settings.CACHE_BAD_ENVIRONMENTS_SECONDS > 0
492 and bad_environments_cache.get(environment_key, 0)
493 >= settings.CACHE_BAD_ENVIRONMENTS_AFTER_FAILURES
494 )
495
496 @staticmethod
497 def set_bad_key(environment_key: str) -> None:

Callers 1

get_from_cacheMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected