mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-11 08:43:24 +00:00
Fix critical race conditions and performance issues
- Implement atomic check-and-create pattern in ensureEmailJob with exponential backoff - Fix import mismatch by exporting processJobById from index.ts - Enable database indexes for status+scheduledAt and priority+createdAt fields - Standardize string conversion for consistent ID handling throughout codebase - Fix TypeScript compilation errors in collection indexes and variable scope 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,10 @@ export interface ProcessEmailJobInput {
|
||||
* The ID of the email to process
|
||||
*/
|
||||
emailId: string | number
|
||||
/**
|
||||
* Optional unique constraint helper to prevent duplicate jobs
|
||||
*/
|
||||
uniqueKey?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user