diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-11-29 18:30:17 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-12-05 13:59:39 +0300 |
commit | 1e6ca3c41ead23c5e433460c8c807ea73d9ec0ef (patch) | |
tree | ed6a5da0def848adc1a15f80e69d9c55651895a4 /db | |
parent | a5c3f1c8ff7da20183b172b2b0693a6010c9e86d (diff) |
Consistently schedule Sidekiq jobs
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20170627101016_schedule_event_migrations.rb | 4 | ||||
-rw-r--r-- | db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/db/post_migrate/20170627101016_schedule_event_migrations.rb b/db/post_migrate/20170627101016_schedule_event_migrations.rb index 1f34375ff0d..1e020d05f78 100644 --- a/db/post_migrate/20170627101016_schedule_event_migrations.rb +++ b/db/post_migrate/20170627101016_schedule_event_migrations.rb @@ -25,14 +25,14 @@ class ScheduleEventMigrations < ActiveRecord::Migration # We push multiple jobs at a time to reduce the time spent in # Sidekiq/Redis operations. We're using this buffer based approach so we # don't need to run additional queries for every range. - BackgroundMigrationWorker.perform_bulk(jobs) + BackgroundMigrationWorker.bulk_perform_async(jobs) jobs.clear end jobs << ['MigrateEventsToPushEventPayloads', [min, max]] end - BackgroundMigrationWorker.perform_bulk(jobs) unless jobs.empty? + BackgroundMigrationWorker.bulk_perform_async(jobs) unless jobs.empty? end def down diff --git a/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb b/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb index 01d56fbd490..467c584c2e0 100644 --- a/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb +++ b/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb @@ -19,7 +19,7 @@ class ScheduleCreateGpgKeySubkeysFromGpgKeys < ActiveRecord::Migration [MIGRATION, [id]] end - BackgroundMigrationWorker.perform_bulk(jobs) + BackgroundMigrationWorker.bulk_perform_async(jobs) end end |