Fix a bug in job periodic task
Change-Id: I4c26e08e3738023b1a7e7e8f0f2c1f59d7e80d79
This commit is contained in:
parent
997c78131e
commit
49c4c10adb
@ -193,8 +193,9 @@ def _delete_all(model, insecure=False, **kwargs):
|
||||
|
||||
@db_base.session_aware()
|
||||
def conditional_update(model, values, expected_values, insecure=False,
|
||||
filters={}, session=None):
|
||||
filters=None, session=None):
|
||||
"""Compare-and-swap conditional update SQLAlchemy implementation."""
|
||||
filters = filters or {}
|
||||
filters.update(expected_values)
|
||||
query = (db_base.model_query(model) if insecure else _secure_query(model))
|
||||
query = db_filters.apply_filters(query, model, **filters)
|
||||
|
@ -88,7 +88,6 @@ def handle_job(engine_client):
|
||||
models.Job,
|
||||
{
|
||||
'status': status.DONE,
|
||||
'trust_id': '',
|
||||
'count': 0
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user