diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-03 14:51:37 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-03 14:51:37 +0000 |
commit | 872b3215d2f07a11e4b5a3dc163fc5c39423ef78 (patch) | |
tree | 2c933ba9fc0a4d67dc6927db68d7a5e3edb6bb3a /lib/api | |
parent | b23b76d8eb182ccc57beee37340ff3c5b726dd9b (diff) | |
parent | 9543025e88d3d0fe298e95330b8d38802da50cc6 (diff) | |
download | gitlab-ce-872b3215d2f07a11e4b5a3dc163fc5c39423ef78.tar.gz |
Merge branch 'introduce-base-polling-interval' into 'master'
Introduce "polling_interval_multiplier" as application setting
Closes #29759
See merge request !10280
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 1 | ||||
-rw-r--r-- | lib/api/settings.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 5954aea8041..01ae2dbd583 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -581,6 +581,7 @@ module API expose :plantuml_enabled expose :plantuml_url expose :terminal_max_session_time + expose :polling_interval_multiplier end class Release < Grape::Entity diff --git a/lib/api/settings.rb b/lib/api/settings.rb index d4d3229f0d1..c7f97ad2aab 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -110,6 +110,7 @@ module API requires :housekeeping_gc_period, type: Integer, desc: "Number of Git pushes after which 'git gc' is run." end optional :terminal_max_session_time, type: Integer, desc: 'Maximum time for web terminal websocket connection (in seconds). Set to 0 for unlimited time.' + optional :polling_interval_multiplier, type: BigDecimal, desc: 'Interval multiplier used by endpoints that perform polling. Set to 0 to disable polling.' at_least_one_of :default_branch_protection, :default_project_visibility, :default_snippet_visibility, :default_group_visibility, :restricted_visibility_levels, :import_sources, :enabled_git_access_protocol, :gravatar_enabled, :default_projects_limit, @@ -125,7 +126,7 @@ module API :akismet_enabled, :admin_notification_email, :sentry_enabled, :repository_storage, :repository_checks_enabled, :koding_enabled, :plantuml_enabled, :version_check_enabled, :email_author_in_body, :html_emails_enabled, - :housekeeping_enabled, :terminal_max_session_time + :housekeeping_enabled, :terminal_max_session_time, :polling_interval_multiplier end put "application/settings" do attrs = declared_params(include_missing: false) |