File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 66DECLARE
77 project_url TEXT ;
88 response JSONB;
9- payload JSONB;
109BEGIN
11- -- Fetch the base URL from Vault
1210 SELECT decrypted_secret INTO project_url
1311 FROM vault .decrypted_secrets
1412 WHERE name = ' project_url' ;
1513
16- -- Validate secrets
1714 IF project_url IS NULL THEN
1815 RAISE EXCEPTION ' project_url is missing' ;
1916 END IF;
2017
21- -- Perform HTTP POST to Edge Function
2218 response := net .http_post (
23- url:= project_url || ' /functions/v1/' || edge_function_name,
19+ url := project_url || ' /functions/v1/' || edge_function_name,
2420 headers := jsonb_build_object(
2521 ' Content-Type' , ' application/json'
2622 )
3026END;
3127$$;
3228
33-
34-
3529SELECT cron .schedule (
3630 ' passive-cron-job' ,
37- ' 0 2 * * *' , -- At 02:00 AM
38- $$ SELECT execute_edge_function (' passive-mining' ); $$
31+ ' 0 2 * * *' , -- At 02:00 AM
32+ $$ SELECT invoke_edge_function (' passive-mining' ); $$
3933);
You can’t perform that action at this time.
0 commit comments