mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 17:00:44 +08:00
fix(supabase-jobs): do not use RPCs
RPCs are more failure-prone for this use case than regular queries are.
This commit is contained in:
parent
a6bcf7b438
commit
f8fbc71f91
@ -31,12 +31,13 @@ export const supabaseGetJobById = async (jobId: string) => {
|
|||||||
* @returns {any[]} Jobs
|
* @returns {any[]} Jobs
|
||||||
*/
|
*/
|
||||||
export const supabaseGetJobsById = async (jobIds: string[]) => {
|
export const supabaseGetJobsById = async (jobIds: string[]) => {
|
||||||
const { data, error } = await supabase_service.rpc("get_jobs_by_ids", {
|
const { data, error } = await supabase_service
|
||||||
job_ids: jobIds,
|
.from("firecrawl_jobs")
|
||||||
});
|
.select()
|
||||||
|
.in("job_id", jobIds);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
Logger.error(`Error in get_jobs_by_ids: ${error}`);
|
Logger.error(`Error in supabaseGetJobsById: ${error}`);
|
||||||
Sentry.captureException(error);
|
Sentry.captureException(error);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user