glance/glance/db/sqlalchemy
Dan Smith 2a0d2303c3 Fix image/tasks API for in-progress tasks
A slight error in the tasks_get_by_image() DB API method resulted in
our excluding in-progress tasks from the returned list. This is
because those tasks have expires_at=NULL, and we were comparing
the expires_at>=$NOW to find unexpired tasks. This makes us check for
"NULL or not expired" instead.

We did have a test asserting the wrong behavior, but it was done to
increase coverage and thus was asserting the behavior of the code and
not the *desired* behavior. This fixes that as well.

Closes-Bug: #1922928
Change-Id: I1b6971888673b64ef60bed8fbcc97bbcbcf5c2ac
2021-04-07 08:10:03 -07:00
..
alembic_migrations Expand tasks database table to add more columns 2021-02-24 05:13:23 +00:00
metadef_api Raise hacking to latest 2.0.0 release 2020-03-27 14:11:08 -05:00
migrate_repo Raise hacking to latest 2.0.0 release 2020-03-27 14:11:08 -05:00
__init__.py Create 'simple' db driver 2012-06-07 09:20:50 -07:00
api.py Fix image/tasks API for in-progress tasks 2021-04-07 08:10:03 -07:00
metadata.py Quiece 'invalid escape sequence' deprecation msg 2019-04-03 17:09:47 +02:00
models.py Expand tasks database table to add more columns 2021-02-24 05:13:23 +00:00
models_metadef.py Replace oslo_utils.timeutils 2015-12-10 10:53:46 +00:00