Client side atproto account migrator in your web browser, along with services for backups and adversarial migrations. pdsmoover.com
pds atproto migrations moo cow
128
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 46 lines 1.3 kB view raw
1CREATE OR REPLACE FUNCTION apalis.push_job( 2 job_type text, 3 job json DEFAULT NULL :: json, 4 job_id text DEFAULT NULL :: text, 5 status text DEFAULT 'Pending' :: text, 6 run_at timestamptz DEFAULT NOW() :: timestamptz, 7 max_attempts integer DEFAULT 25 :: integer 8) RETURNS apalis.jobs AS $$ 9 10 DECLARE 11 v_job_row apalis.jobs; 12 v_job_id text; 13 14 BEGIN 15 IF job_type is not NULL and length(job_type) > 512 THEN raise exception 'Job_type is too long (max length: 512).' USING errcode = 'APAJT'; 16 END IF; 17 18 IF max_attempts < 1 THEN raise exception 'Job maximum attempts must be at least 1.' USING errcode = 'APAMA'; 19 end IF; 20 21 SELECT 22 uuid_in( 23 md5(random() :: text || now() :: text) :: cstring 24 ) INTO v_job_id; 25 INSERT INTO 26 apalis.jobs 27 VALUES 28 ( 29 job, 30 v_job_id, 31 job_type, 32 status, 33 0, 34 max_attempts, 35 run_at, 36 NULL, 37 NULL, 38 NULL, 39 NULL 40 ) 41 returning * INTO v_job_row; 42 RETURN v_job_row; 43END; 44$$ LANGUAGE plpgsql volatile; 45 46