Commit 1ef6bb6c authored by Bob Van Landuyt's avatar Bob Van Landuyt

Add job limit columns to application settings

This adds the schema changes for the sidekiq job limiter
parent 81992919
# frozen_string_literal: true
class AddSidekiqLimitsToApplicationSettings < Gitlab::Database::Migration[1.0]
disable_ddl_transaction! # needed for now to avoid subtransactions
def up
with_lock_retries do
add_column :application_settings, :sidekiq_job_limiter_mode, :smallint, default: 1, null: false
add_column :application_settings, :sidekiq_job_limiter_compression_threshold_bytes, :integer, default: 100_000, null: false
add_column :application_settings, :sidekiq_job_limiter_limit_bytes, :integer, default: 0, null: false
end
end
def down
with_lock_retries do
remove_column :application_settings, :sidekiq_job_limiter_mode
remove_column :application_settings, :sidekiq_job_limiter_compression_threshold_bytes
remove_column :application_settings, :sidekiq_job_limiter_limit_bytes
end
end
end
a8dc6d1fecf7b26182dd89f4dae088fb315774ff4720c282f608bd0c45c75a41
\ No newline at end of file
......@@ -10340,6 +10340,9 @@ CREATE TABLE application_settings (
throttle_unauthenticated_api_enabled boolean DEFAULT false NOT NULL,
throttle_unauthenticated_api_requests_per_period integer DEFAULT 3600 NOT NULL,
throttle_unauthenticated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
sidekiq_job_limiter_mode smallint DEFAULT 1 NOT NULL,
sidekiq_job_limiter_compression_threshold_bytes integer DEFAULT 100000 NOT NULL,
sidekiq_job_limiter_limit_bytes integer DEFAULT 0 NOT NULL,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)),
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment