From 3a1d0baef8b042701959ac0e67153f7955a147a5 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Fri, 19 Jan 2024 00:13:17 +0100 Subject: [PATCH] Update grafana cron job, add notification --- initdb/02_2_signalk_cron.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/initdb/02_2_signalk_cron.sql b/initdb/02_2_signalk_cron.sql index 67c613b..fb29d63 100644 --- a/initdb/02_2_signalk_cron.sql +++ b/initdb/02_2_signalk_cron.sql @@ -384,6 +384,11 @@ BEGIN AND m.vessel_id = v.vessel_id; -- as we got data from the vessel we can do the grafana provisioning. PERFORM grafana_py_fn(data_rec.name, data_rec.vessel_id, data_rec.owner_email, app_settings); + -- Gather user settings + user_settings := get_user_settings_from_vesselid_fn(data_rec.vessel_id::TEXT); + RAISE DEBUG '-> DEBUG cron_process_grafana_fn get_user_settings_from_vesselid_fn [%]', user_settings; + -- Send notification + PERFORM send_notification_fn('grafana'::TEXT, user_settings::JSONB); -- update process_queue entry as processed UPDATE process_queue SET