Update cron process output, add autodiscovery

This commit is contained in:
xbgmsharp
2025-05-25 15:47:37 +02:00
parent 00d2247549
commit a76c25b19f
2 changed files with 9 additions and 1 deletions

View File

@@ -15,7 +15,12 @@ select current_database();
\echo 'Check the number of process pending'
-- Should be 24
SELECT count(*) as jobs from public.process_queue pq where pq.processed is null;
--set role scheduler
-- Switch to the scheduler role
--\echo 'Switch to the scheduler role'
--SET ROLE scheduler;
-- Should be 24
SELECT count(*) as jobs from public.process_queue pq where pq.processed is null;
-- Run the cron jobs
SELECT public.run_cron_jobs();
-- Check any pending job
SELECT count(*) as any_pending_jobs from public.process_queue pq where pq.processed is null;

View File

@@ -9,6 +9,9 @@ Check the number of process pending
-[ RECORD 1 ]
jobs | 26
-[ RECORD 1 ]
jobs | 26
-[ RECORD 1 ]-+-
run_cron_jobs |