Code style
This commit is contained in:
parent
02831af9da
commit
6b6fb11a23
|
@ -38,7 +38,8 @@ module Ci
|
||||||
scope :unstarted, ->() { where(runner_id: nil) }
|
scope :unstarted, ->() { where(runner_id: nil) }
|
||||||
scope :ignore_failures, ->() { where(allow_failure: false) }
|
scope :ignore_failures, ->() { where(allow_failure: false) }
|
||||||
scope :with_artifacts, ->() do
|
scope :with_artifacts, ->() do
|
||||||
where('(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)', '', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.build_id'))
|
where('(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)',
|
||||||
|
'', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id'))
|
||||||
end
|
end
|
||||||
scope :with_artifacts_not_expired, ->() { with_artifacts.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
|
scope :with_artifacts_not_expired, ->() { with_artifacts.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
|
||||||
scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }
|
scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }
|
||||||
|
|
Loading…
Reference in New Issue