Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/background_migrations_controller.rb')
-rw-r--r--app/controllers/admin/background_migrations_controller.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/admin/background_migrations_controller.rb b/app/controllers/admin/background_migrations_controller.rb
index 65b47308e4c..e21e6fd2dcb 100644
--- a/app/controllers/admin/background_migrations_controller.rb
+++ b/app/controllers/admin/background_migrations_controller.rb
@@ -29,9 +29,16 @@ class Admin::BackgroundMigrationsController < Admin::ApplicationController
redirect_back fallback_location: { action: 'index' }
end
+ def retry
+ migration = batched_migration_class.find(params[:id])
+ migration.retry_failed_jobs! if migration.failed?
+
+ redirect_back fallback_location: { action: 'index' }
+ end
+
private
def batched_migration_class
- Gitlab::Database::BackgroundMigration::BatchedMigration
+ @batched_migration_class ||= Gitlab::Database::BackgroundMigration::BatchedMigration
end
end