Add ref_id to process_queue table to allow timeline per user_id and/or vessel_id

This commit is contained in:
xbgmsharp
2023-06-25 15:12:04 +02:00
parent 4d833999e8
commit 2599f40f7b
5 changed files with 35 additions and 22 deletions

View File

@@ -145,9 +145,9 @@ begin
--PERFORM send_pushover_py_fn('monitor_offline'::TEXT, user_settings::JSONB, app_settings::JSONB);
-- log/insert/update process_queue table with processed
INSERT INTO process_queue
(channel, payload, stored, processed)
(channel, payload, stored, processed, ref_id)
VALUES
('monitoring_offline', metadata_rec.id, metadata_rec.interval, now())
('monitoring_offline', metadata_rec.id, metadata_rec.interval, now(), metadata_rec.vessel_id)
RETURNING id INTO process_id;
RAISE NOTICE '-> cron_process_monitor_offline_fn updated process_queue table [%]', process_id;
END LOOP;