Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Apply @ulferts feedback

Marcello Rocha36108c86c028
diff --git a/app/workers/mails/reminder_job.rb b/app/workers/mails/reminder_job.rb
index d110423c5a3..7e088434228 100644
--- a/app/workers/mails/reminder_job.rb
+++ b/app/workers/mails/reminder_job.rb
@@ -28,6 +28,9 @@
class Mails::ReminderJob < Mails::DeliverJob
include ::Notifications::WithMarkedNotifications
+ include GoodJob::ActiveJobExtensions::Concurrency
+
+ good_job_control_concurrency_with total_limit: 1
private
diff --git a/app/workers/notifications/create_date_alerts_notifications_job.rb b/app/workers/notifications/create_date_alerts_notifications_job.rb
index e5fb7938ea8..98e8beb6955 100644
--- a/app/workers/notifications/create_date_alerts_notifications_job.rb
+++ b/app/workers/notifications/create_date_alerts_notifications_job.rb
@@ -30,14 +30,7 @@ module Notifications
class CreateDateAlertsNotificationsJob < ApplicationJob
include GoodJob::ActiveJobExtensions::Concurrency
- good_job_control_concurrency_with(
- enqueue_limit: 1,
- perform_limit: 1
- )
-
- retry_on GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError,
- wait: 5.minutes,
- attempts: 3
+ good_job_control_concurrency_with total_limit: 1
def perform(user)
return unless EnterpriseToken.allows_to?(:date_alerts)
diff --git a/app/workers/work_packages/apply_working_days_change_job.rb b/app/workers/work_packages/apply_working_days_change_job.rb
index 715b299cfb1..8b4f1799237 100644
--- a/app/workers/work_packages/apply_working_days_change_job.rb
+++ b/app/workers/work_packages/apply_working_days_change_job.rb
@@ -34,10 +34,6 @@ class WorkPackages::ApplyWorkingDaysChangeJob < ApplicationJob
total_limit: 1
)
- retry_on GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError,
- wait: 5.minutes,
- attempts: 3
-
def perform(user_id:, previous_working_days:, previous_non_working_days:)
user = User.find(user_id)
diff --git a/app/workers/work_packages/progress/job.rb b/app/workers/work_packages/progress/job.rb
index efdce867591..c4c1bb47222 100644
--- a/app/workers/work_packages/progress/job.rb
+++ b/app/workers/work_packages/progress/job.rb
@@ -42,5 +42,5 @@ class WorkPackages::Progress::Job < ApplicationJob
retry_on GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError,
wait: 5.minutes,
- attempts: 3
+ attempts: :unlimited
end