summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-03 13:00:38 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-03 13:00:38 +0200
commita078767223ca9e66a9d5dbf614b2efc8bf7c45d4 (patch)
tree49475595bdb67ff5dfaf9d74524bf994f791ce40
parent134f204ed8f5dd80e44463338ae93f3d905ca7af (diff)
downloadgitlab-ce-a078767223ca9e66a9d5dbf614b2efc8bf7c45d4.tar.gz
Improve exception description in bg migrations
-rw-r--r--app/workers/background_migration_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/background_migration_worker.rb b/app/workers/background_migration_worker.rb
index e7ed71a687c..45ce49bb5c0 100644
--- a/app/workers/background_migration_worker.rb
+++ b/app/workers/background_migration_worker.rb
@@ -20,7 +20,9 @@ class BackgroundMigrationWorker
now = Time.now.to_i
schedule = now + delay.to_i
- raise ArgumentError, 'Delay time invalid!' if schedule <= now
+ if schedule <= now
+ raise ArgumentError, 'The schedule time must be in the future!'
+ end
Sidekiq::Client.push_bulk('class' => self,
'queue' => sidekiq_options['queue'],