Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate if broken job emails are being sent #435

Closed
emteknetnz opened this issue Jun 19, 2024 · 2 comments
Closed

Validate if broken job emails are being sent #435

emteknetnz opened this issue Jun 19, 2024 · 2 comments
Assignees
Labels

Comments

@emteknetnz
Copy link
Collaborator

emteknetnz commented Jun 19, 2024

Seems like broken job notification emails are not being sent - at least that's the feedback from one developer I've spoken to about this @joechamberlain1

When creating a job that throws an exception in its process() method, so that the JobDescriptior->JobStatus is set to Broken, and after removing any non-broken job descriptors from the queue, and then running the queue, an email should be sent to the admin saying that there are broken jobs in the queue

There is an log entry when running the queue "Broken jobs were found in the job queue" - however looking at the code where this comes from https://github.com/symbiote/silverstripe-queuedjobs/blob/4/src/Services/QueuedJobService.php#L500 - I'm not sure where the email is actually being sent

Note that 'NotifiedBroken' is used to limit sending the admin email to a single send

Things might be working fine, though I think we need to validate locally that they actually are

Acceptance criteria

  • Validate if broken queued job will send email in a standard environment.
  • If not, then create a follow up issue.

PRs

@maxime-rainville maxime-rainville changed the title Not sure if broken job emails are being sent Validate if broken job emails are being sent Jun 23, 2024
@emteknetnz
Copy link
Collaborator Author

I've validated that an email is NOT sent in a standard environment when there are broken jobs found in the job queue

While the AC's say "create a follow up issue", the fix is pretty simple so I've just gone ahead and implemented it in a linked PR

@GuySartorelli
Copy link
Collaborator

GuySartorelli commented Jun 27, 2024

PR merged, this will be included in the October minor release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants