Browse Source

Fix a bug in job periodic task

Change-Id: I4c26e08e3738023b1a7e7e8f0f2c1f59d7e80d79
changes/76/487276/1
Lingxian Kong 4 years ago
parent
commit
49c4c10adb
  1. 3
      qinling/db/sqlalchemy/api.py
  2. 1
      qinling/services/periodics.py

3
qinling/db/sqlalchemy/api.py

@ -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)

1
qinling/services/periodics.py

@ -88,7 +88,6 @@ def handle_job(engine_client):
models.Job,
{
'status': status.DONE,
'trust_id': '',
'count': 0
},
{

Loading…
Cancel
Save