Change sec scan candidate query to match parents to the expected version only
This commit is contained in:
parent
aef651a7ad
commit
4e771e667f
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ def get_secscan_candidates(engine_version, batch_size):
|
||||||
ParentImageStorage = ImageStorage.alias()
|
ParentImageStorage = ImageStorage.alias()
|
||||||
rimages = []
|
rimages = []
|
||||||
|
|
||||||
# Collect the images without parents
|
# Collect the images without parents.
|
||||||
candidates = list(Image
|
candidates = list(Image
|
||||||
.select(Image.id)
|
.select(Image.id)
|
||||||
.join(ImageStorage)
|
.join(ImageStorage)
|
||||||
|
@ -455,7 +455,7 @@ def get_secscan_candidates(engine_version, batch_size):
|
||||||
.switch(Image)
|
.switch(Image)
|
||||||
.join(ImageStorage)
|
.join(ImageStorage)
|
||||||
.where(Image.security_indexed_engine < engine_version,
|
.where(Image.security_indexed_engine < engine_version,
|
||||||
Parent.security_indexed_engine >= engine_version,
|
Parent.security_indexed_engine == engine_version,
|
||||||
ImageStorage.uploading == False)
|
ImageStorage.uploading == False)
|
||||||
.limit(batch_size*10))
|
.limit(batch_size*10))
|
||||||
|
|
||||||
|
|
Reference in a new issue