diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-11-29 09:12:12 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-29 09:12:12 +0000 |
commit | 64e5f996fa01d2e9c8462cfbb647997531eaf6c7 (patch) | |
tree | b3bebc2fd1be9822f8be2124aee9acff5acd3ded /db/migrate | |
parent | a4f8dddc212fcd91f6a4a09e92b2de6117a21305 (diff) | |
download | gitlab-ce-64e5f996fa01d2e9c8462cfbb647997531eaf6c7.tar.gz |
Add timeouts for Gitaly calls
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb new file mode 100644 index 00000000000..de621e7111c --- /dev/null +++ b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb @@ -0,0 +1,31 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddGitalyTimeoutPropertiesToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default :application_settings, + :gitaly_timeout_default, + :integer, + default: 55 + add_column_with_default :application_settings, + :gitaly_timeout_medium, + :integer, + default: 30 + add_column_with_default :application_settings, + :gitaly_timeout_fast, + :integer, + default: 10 + end + + def down + remove_column :application_settings, :gitaly_timeout_default + remove_column :application_settings, :gitaly_timeout_medium + remove_column :application_settings, :gitaly_timeout_fast + end +end |