diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-06-19 20:24:14 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-06-28 19:51:05 +0300 |
commit | 1fbb7f977777de7c8808429693359c7a98ffdfcc (patch) | |
tree | bb872e346a9fb3b6c6d9001196ee931dba632387 /app/services/ci/register_job_service.rb | |
parent | 34f57b462bc14ad194cf890a4585d403bdbde55c (diff) |
Removes redundant pending delete checks
Diffstat (limited to 'app/services/ci/register_job_service.rb')
-rw-r--r-- | app/services/ci/register_job_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index 27bdb6b9a2f..b951e8d0c9f 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -54,9 +54,9 @@ module Ci def builds_for_shared_runner new_builds. # don't run projects which have not enabled shared runners and builds - joins(:project).where(projects: { shared_runners_enabled: true, pending_delete: false }). - joins('LEFT JOIN project_features ON ci_builds.project_id = project_features.project_id'). - where('project_features.builds_access_level IS NULL or project_features.builds_access_level > 0'). + joins(:project).where(projects: { shared_runners_enabled: true, pending_delete: false }) + .joins('LEFT JOIN project_features ON ci_builds.project_id = project_features.project_id') + .where('project_features.builds_access_level IS NULL or project_features.builds_access_level > 0'). # Implement fair scheduling # this returns builds that are ordered by number of running builds |