diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-03 14:00:38 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-07 16:08:15 +0300 |
commit | 5e2baaf39fc53e154d40b130eddbec756274cfe2 (patch) | |
tree | b2d44c5b074f5588085b6f9fdff472aa704c6b80 /app | |
parent | 3408157155924e7bc817960767f69cc1fce9a5a5 (diff) |
Improve exception description in bg migrations
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/background_migration_worker.rb | 4 |
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'], |