2021-11-08 12:12:07 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Currently we register validator only for `dev` or `test` environment
|
2021-11-10 03:10:14 +00:00
|
|
|
if Gitlab.dev_or_test_env? || Gitlab::Utils.to_boolean(ENV['GITLAB_ENABLE_QUERY_ANALYZERS'], default: false)
|
|
|
|
Gitlab::Database::QueryAnalyzer.instance.hook!
|
|
|
|
end
|