Skip to content

Commit

Permalink
add notification scripts (#1736)
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes authored Oct 2, 2024
1 parent 4b0d0f0 commit b096304
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ee/drift/scripts/cron/notifications.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
select
cron.schedule(
'invoke-notification-schedule-every-hour-15',
'15 * * * *',
$$
select
net.http_post(
url:='https://{DIGGER_HOSTNAME}/_internal/process_notifications',
headers:=jsonb_build_object('Content-Type','application/json', 'Authorization', 'Bearer ' || {DIGGER_WEBHOOK_SECRET}),
body:=jsonb_build_object('time', now() ),
timeout_milliseconds:=5000
) as request_id;
$$
);

0 comments on commit b096304

Please sign in to comment.