Refactor and clean up job organization

- Properly encapsulate processEmailsJob in its own file with handler and definition
- Clean up index.ts to remove duplicate code and just export job definitions
- Add comprehensive JSDoc comments for better documentation
- Separate job handler logic from job definition for clarity
- Fix job scheduling to use correct field names
- Bump version to 0.2.1
This commit is contained in:
2025-09-14 17:16:01 +02:00
parent ddee7d5a76
commit 8f200da449
4 changed files with 62 additions and 37 deletions

View File

@@ -64,6 +64,10 @@ function transformTaskInputToSendEmailOptions(taskInput: SendEmailTaskInput) {
return sendEmailOptions
}
/**
* Job definition for sending emails
* Can be used through Payload's job queue system to send emails programmatically
*/
export const sendEmailJob = {
slug: 'send-email',
label: 'Send Email',