This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION public.read_topic( | |
queue_name text, | |
qty int, | |
sleep_seconds int, | |
topic text | |
) | |
RETURNS TABLE ( | |
msg_id bigint, | |
read_ct int, | |
enqueued_at timestamptz, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return cache(url, ttlSeconds * 1000, async () => { | |
const response = await request(url); | |
return JSON.parse(response); | |
}); |