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

Retries 50 times stopping after around 12h

Marcello Rocha8d67467ff8fd
diff --git a/modules/storages/app/workers/storages/copy_project_folders_job.rb b/modules/storages/app/workers/storages/copy_project_folders_job.rb
index 7c8be25e2c7..e26a39fa41e 100644
--- a/modules/storages/app/workers/storages/copy_project_folders_job.rb
+++ b/modules/storages/app/workers/storages/copy_project_folders_job.rb
@@ -32,7 +32,9 @@ module Storages
class CopyProjectFoldersJob < ApplicationJob
include GoodJob::ActiveJobExtensions::Batches
- retry_on Errors::PollingRequired, wait: 3, attempts: :unlimited
+ retry_on Errors::PollingRequired, attempts: 50, wait: ->(executions) do
+ (executions**2) + (Kernel.rand * (executions**2) * 0.15) + 2
+ end
discard_on HTTPX::HTTPError
def perform(source:, target:, work_packages_map:)