https://community.openproject.org/wp/57932
Retrying 14 times with polynomial backoff means it will retry for
roughly 1.5 days.
Previously the `retry_on StandardError` defined in the
`Mails::MailerJob` class was ignored because there is also a
`rescue_from StandardError` declared after it. As `retry_on` is
implemented using `rescue_from`, and the handlers are evaluated in
reverse order, the last declared `rescue_from` would be picked up and
the retry logic would not be triggered. That's why mail jobs were
discarded instead of being retried.
This commit fixes the issue by inheriting directly from
`ActionMailer::MailDeliveryJob` instead of redefining its methods. This
was the `rescue_from` is declared first in the parent class, and then
`retry_on` is declared second in the child class, meaning it will take
precedence and be picked up.
The needed shared logic from `ApplicationJob` is extracted to a new
`SharedJobSetup` module and included in both `ApplicationJob` and
`Mails::MailerJob`.
- Do not use string literals for job class names. Use `class.name` instead.
- Rename `ApplicationJob#good_job_scheduled_at` to `ApplicationJob#job_scheduled_at` to be backend agnostic.
- update queries in bin/check-worker-liveness to use good_jobs table
- Set good_job config options through appropriate OpenProject::Configuration
- Remove delayed_jobs table.
- Update health_check docs.
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
This is currently only employed for work package export jobs but is
intended to be used more broadly, e.g. to signal the status of copying a
project.
[ci skip]
We're getting more and more reports on synchronous Timeouts and SMTP
errors causing internal errors for users when trying to send mail in the
request of the browser.
With rails 5.2, we can assign a custom job that handles the
`deliver_later` delayed sending. We can hook this into the
ApplicationJob with delayed_job.
Since rails now also has GlobalID serialization of ActiveRecord, we
don't even need to do the serialization ourselves!