Merge pull request #2420 from jzelinskie/faster-min
data.model.tag: find min *alive* tag
This commit is contained in:
commit
47a99fccb6
1 changed files with 4 additions and 5 deletions
|
@ -20,11 +20,10 @@ def get_max_id_for_sec_scan():
|
||||||
|
|
||||||
def get_min_id_for_sec_scan(version):
|
def get_min_id_for_sec_scan(version):
|
||||||
""" Gets the minimum id for a security scanning """
|
""" Gets the minimum id for a security scanning """
|
||||||
return (RepositoryTag
|
return _tag_alive(RepositoryTag
|
||||||
.select(fn.Min(RepositoryTag.id))
|
.select(fn.Min(RepositoryTag.id))
|
||||||
.join(Image)
|
.join(Image)
|
||||||
.where(Image.security_indexed_engine < version)
|
.where(Image.security_indexed_engine < version)).scalar()
|
||||||
.scalar())
|
|
||||||
|
|
||||||
|
|
||||||
def get_tag_pk_field():
|
def get_tag_pk_field():
|
||||||
|
|
Reference in a new issue