MED-88: add doctor email notifications (#65)
* MED-88: add doctor email notifications * add logging, send open jobs notification on partial analysis response * update permissions * fix import, permissions * casing, let email be null * unused import
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
create extension if not exists pg_cron;
|
||||
create extension if not exists pg_net;
|
||||
|
||||
select
|
||||
cron.schedule(
|
||||
'send emails with new unassigned jobs 4x a day',
|
||||
'0 4,9,14,18 * * 1-5', -- Run at 07:00, 12:00, 17:00 and 21:00 (GMT +3) on weekdays only
|
||||
$$
|
||||
select
|
||||
net.http_post(
|
||||
url := 'https://test.medreport.ee/api/job/send-open-jobs-emails',
|
||||
headers := jsonb_build_object(
|
||||
'x-jobs-api-key', 'fd26ec26-70ed-11f0-9e95-431ac3b15a84'
|
||||
)
|
||||
) as request_id;
|
||||
$$
|
||||
);
|
||||
Reference in New Issue
Block a user