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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Adds a concurrency key to the jobs depending on the user_id
Marcello Rocha8c33cb59ef41
diff --git a/app/workers/mails/reminder_job.rb b/app/workers/mails/reminder_job.rbindex 7e088434228..afcac61bac0 100644--- a/app/workers/mails/reminder_job.rb+++ b/app/workers/mails/reminder_job.rb@@ -30,7 +30,10 @@ class Mails::ReminderJob < Mails::DeliverJobinclude ::Notifications::WithMarkedNotificationsinclude GoodJob::ActiveJobExtensions::Concurrency- good_job_control_concurrency_with total_limit: 1+ good_job_control_concurrency_with(+ total_limit: 1,+ key: -> { "#{self.class.name}-#{arguments.last}" }+ )privatediff --git a/app/workers/notifications/create_date_alerts_notifications_job.rb b/app/workers/notifications/create_date_alerts_notifications_job.rbindex 98e8beb6955..181c5028668 100644--- a/app/workers/notifications/create_date_alerts_notifications_job.rb+++ b/app/workers/notifications/create_date_alerts_notifications_job.rb@@ -30,7 +30,10 @@ module Notificationsclass CreateDateAlertsNotificationsJob < ApplicationJobinclude GoodJob::ActiveJobExtensions::Concurrency- good_job_control_concurrency_with total_limit: 1+ good_job_control_concurrency_with(+ total_limit: 1,+ key: -> { "#{self.class.name}-#{arguments.last}" }+ )def perform(user)return unless EnterpriseToken.allows_to?(:date_alerts)