policies: fix cached policy metric (#7068)
This commit is contained in:
parent
83f9eae654
commit
f28f301865
|
@ -17,7 +17,7 @@ LOGGER = get_logger()
|
||||||
@receiver(monitoring_set)
|
@receiver(monitoring_set)
|
||||||
def monitoring_set_policies(sender, **kwargs):
|
def monitoring_set_policies(sender, **kwargs):
|
||||||
"""set policy gauges"""
|
"""set policy gauges"""
|
||||||
GAUGE_POLICIES_CACHED.set(len(cache.keys(f"{CACHE_PREFIX}_*") or []))
|
GAUGE_POLICIES_CACHED.set(len(cache.keys(f"{CACHE_PREFIX}*") or []))
|
||||||
|
|
||||||
|
|
||||||
@receiver(post_save, sender=Policy)
|
@receiver(post_save, sender=Policy)
|
||||||
|
|
Reference in New Issue