diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-11-04 12:53:12 -0600 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-11-10 11:38:10 -0600 |
commit | 9e2964c15a7d387e46e25c83afa478c12a856d77 (patch) | |
tree | d17fbb92b21696b765b1eb3d903330c5383a7213 /db | |
parent | d366a943ffe2ae6c3599c2ebc4469d49a103bacb (diff) | |
download | gitlab-ce-9e2964c15a7d387e46e25c83afa478c12a856d77.tar.gz |
Allow certain Sidekiq jobs to be throttled
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb | 29 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb new file mode 100644 index 00000000000..e2839219fb7 --- /dev/null +++ b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb @@ -0,0 +1,29 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :application_settings, :sidekiq_throttling_enabled, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 62c325a52d7..31d01403508 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -98,6 +98,7 @@ ActiveRecord::Schema.define(version: 20161106185620) do t.text "help_page_text_html" t.text "shared_runners_text_html" t.text "after_sign_up_text_html" + t.boolean "sidekiq_throttling_enabled", default: false t.boolean "housekeeping_enabled", default: true, null: false t.boolean "housekeeping_bitmaps_enabled", default: true, null: false t.integer "housekeeping_incremental_repack_period", default: 10, null: false |