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

avoid naming conflicts on concurrency key

ulferts8937defc9c94
diff --git a/app/workers/mails/reminder_job.rb b/app/workers/mails/reminder_job.rb
index 01e84db4ea2..bbc6eaba109 100644
--- a/app/workers/mails/reminder_job.rb
+++ b/app/workers/mails/reminder_job.rb
@@ -32,7 +32,11 @@ class Mails::ReminderJob < Mails::DeliverJob
good_job_control_concurrency_with(
total_limit: 1,
- key: -> { "#{self.class.name}-#{arguments.last}" }
+ key: -> do
+ id = arguments.last.respond_to?(:id) ? arguments.last.id : arguments.last
+
+ "#{self.class.name}-#{id}"
+ end
)
private