Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
-- Prevents two AutomationRun rows from being "running"/"cancelling" at once
-- for the same automation. The prior guard (SELECT-then-INSERT inside a
-- $transaction) assumed SQLite serializes concurrent write transactions,
-- but deferred transactions don't take a write lock until the first write,
-- so two concurrent runAutomation() calls could both pass the SELECT check
-- before either INSERTed, producing duplicate concurrent runs (and, in turn,
-- duplicate discovered jobs since each run computed its own dedup snapshot).
-- Partial index (not expressible via Prisma's schema DSL) so historical
-- completed/failed/cancelled runs are unaffected.
CREATE UNIQUE INDEX "AutomationRun_automationId_active_key"
ON "AutomationRun"("automationId")
WHERE "status" IN ('running', 'cancelling');