Skip to content

Duplicate adhoc task emails sent #714

@matthewhilton

Description

@matthewhilton

The issue_certificates_task checks if the issue has been emailed yet and skips if it has been, but this doesn't take into account the fact that the adhoc tasks may be delayed (as the adhoc task is the one that sets the emailed flag).

For example if issue_certificates_task was run 3 times before adhoc tasks ran, it would queue 3 emailing tasks, and each of these would email the user.

IMO it should de-duplicate these tasks to account for the fact they may be delayed/queued/processing - so that users are only ever emailed their certificate once.

Should be as simple as adding checkforexisting = true here

\core\task\manager::queue_adhoc_task($task);

Or alternatively some locking in the adhoc tasks to ensure only 1 is running per issue at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions