Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

506 db statusanzeige erweitern des verarbeitungsprozesses #530

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Postgres-cds_hub/init/02_db_config_tools.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
----------------------------------------------------
CREATE OR REPLACE VIEW db_config.v_cron_jobs AS
SELECT command, count(1) anzahl
, (SELECT to_char(max(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHEREs.command=m.command AND s.status='succeeded') last_succeeded_run
, (SELECT to_char(min(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHEREs.command=m.command AND s.status='succeeded') first_succeeded_run
, (SELECT to_char(max(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHEREs.command=m.command AND s.status!='succeeded') last_faild_run
, (SELECT to_char(max(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHERE command=m.command AND s.status='succeeded') last_succeeded_run
, (SELECT to_char(min(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHERE command=m.command AND s.status='succeeded') first_succeeded_run
, (SELECT to_char(max(s.end_time),'YYYY-MM-DD HH24:MI:SS') FROM cron.job_run_details s WHERE command=m.command AND s.status!='succeeded') last_faild_run
FROM cron.job_run_details m group by command ORDER BY 3 desc;

GRANT SELECT ON db_config.v_cron_jobs TO db_user;
Expand Down