diff options
Diffstat (limited to 'lib/gitlab/application_context.rb')
-rw-r--r-- | lib/gitlab/application_context.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/application_context.rb b/lib/gitlab/application_context.rb index 760f1352256..aa33f56582b 100644 --- a/lib/gitlab/application_context.rb +++ b/lib/gitlab/application_context.rb @@ -124,7 +124,10 @@ module Gitlab strong_memoize(:runner_project) do next unless runner&.project_type? - projects = runner.projects.take(2) # rubocop: disable CodeReuse/ActiveRecord + projects = ::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/342147') do + runner.projects.take(2) # rubocop: disable CodeReuse/ActiveRecord + end + projects.first if projects.one? end end |