mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
Consolidate and simplify email job system
- Replace inline plugin task with jobs directory system - Move sendTemplateEmailTask to jobs/sendEmailTask.ts and integrate with createMailingJobs() - Simplify processEmailsJob to always process both pending and failed emails in one task - Remove separate 'retry-failed' task type - retry logic now runs automatically - Update MailingService to support lazy initialization for job context - Update exports to include consolidated job system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { processEmailsJob, ProcessEmailsJobData } from './processEmailsJob.js'
|
||||
import { sendEmailJob } from './sendEmailTask.js'
|
||||
import { MailingService } from '../services/MailingService.js'
|
||||
|
||||
export const createMailingJobs = (mailingService: MailingService): any[] => {
|
||||
@@ -13,7 +14,9 @@ export const createMailingJobs = (mailingService: MailingService): any[] => {
|
||||
},
|
||||
interfaceName: 'ProcessEmailsJob',
|
||||
},
|
||||
sendEmailJob,
|
||||
]
|
||||
}
|
||||
|
||||
export * from './processEmailsJob.js'
|
||||
export * from './processEmailsJob.js'
|
||||
export * from './sendEmailTask.js'
|
||||
Reference in New Issue
Block a user