mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +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
|
||||
*/
|
||||
export const supabaseGetJobsById = async (jobIds: string[]) => {
|
||||
const { data, error } = await supabase_service.rpc("get_jobs_by_ids", {
|
||||
job_ids: jobIds,
|
||||
});
|
||||
const { data, error } = await supabase_service
|
||||
.from("firecrawl_jobs")
|
||||
.select()
|
||||
.in("job_id", jobIds);
|
||||
|
||||
if (error) {
|
||||
Logger.error(`Error in get_jobs_by_ids: ${error}`);
|
||||
Logger.error(`Error in supabaseGetJobsById: ${error}`);
|
||||
Sentry.captureException(error);
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user