v0.7.35 - Implement event-driven monitoring system with dual triggers for events and subscriptions

This commit is contained in:
Your Name
2025-10-22 10:48:57 -04:00
parent 9179d57cc9
commit 182e12817d
5 changed files with 64 additions and 12 deletions

View File

@@ -310,6 +310,9 @@ int add_subscription_to_manager(subscription_t* sub) {
// Log subscription creation to database (INSERT OR REPLACE handles duplicates)
log_subscription_created(sub);
// Trigger monitoring update for subscription changes
monitoring_on_subscription_change();
return 0;
}
@@ -357,6 +360,9 @@ int remove_subscription_from_manager(const char* sub_id, struct lws* wsi) {
// Update events sent counter before freeing
update_subscription_events_sent(sub_id_copy, events_sent_copy);
// Trigger monitoring update for subscription changes
monitoring_on_subscription_change();
free_subscription(sub);
return 0;
}