MCPcopy
hub / github.com/cursor/community-plugins / getStuckScans

Function getStuckScans

apps/cursor/src/data/queries.ts:525–539  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

523}
524
525export async function getStuckScans() {
526 const supabase = await createClient();
527 const fifteenMinutesAgo = new Date(Date.now() - 15 * 60 * 1000).toISOString();
528
529 const { data, error } = await supabase
530 .from("plugins")
531 .select("*, plugin_components(*)")
532 .or(
533 `scan_status.eq.error,and(scan_status.in.(pending,scanning),created_at.lt.${fifteenMinutesAgo})`,
534 )
535 .order("created_at", { ascending: false })
536 .limit(200);
537
538 return { data: data as PluginRow[] | null, error };
539}
540
541export async function getStarredPlugins(userId: string) {
542 "use cache";

Callers 1

AdminPluginsContentFunction · 0.90

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected