Skip to content

Commit fc1dc6a

Browse files
nuclearcatJenySadadia
authored andcommitted
main: Add metrics to monitor subscriptions cleanup
Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent 43360b2 commit fc1dc6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ async def subscription_cleanup_task():
114114
cleaned = await pubsub.cleanup_stale_subscriptions(
115115
SUBSCRIPTION_MAX_AGE_MINUTES)
116116
if cleaned > 0:
117+
metrics.add('subscriptions_cleaned', 1)
117118
print(f"Cleaned up {cleaned} stale subscriptions")
118119
except (ConnectionError, OSError, RuntimeError) as e:
119120
print(f"Subscription cleanup error: {e}")

0 commit comments

Comments
 (0)