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

Do not reschedule meeting on error, and add total limit

Oliver Günther969247e98d0f
diff --git a/modules/meeting/app/workers/recurring_meetings/init_next_occurrence_job.rb b/modules/meeting/app/workers/recurring_meetings/init_next_occurrence_job.rb
index 8d818cad011..8952756a7e4 100644
--- a/modules/meeting/app/workers/recurring_meetings/init_next_occurrence_job.rb
+++ b/modules/meeting/app/workers/recurring_meetings/init_next_occurrence_job.rb
@@ -29,9 +29,10 @@
module RecurringMeetings
class InitNextOccurrenceJob < ApplicationJob
include GoodJob::ActiveJobExtensions::Concurrency
+ discard_on ActiveJob::DeserializationError
good_job_control_concurrency_with(
- perform_limit: 1,
+ total_limit: 1,
key: -> { self.class.unique_key(arguments.first) }
)
@@ -51,10 +52,11 @@ module RecurringMeetings
# Schedule the next occurrence, if not instantiated
check_next_occurrence
+
+ # Schedule the next job
+ schedule_next_job
rescue StandardError => e
Rails.logger.error { "Error while initializing next occurrence for series ##{recurring_meeting}: #{e.message}" }
- ensure
- schedule_next_job
end
private