Skip to content

Commit

Permalink
Merge pull request #259 from HSF/dev
Browse files Browse the repository at this point in the history
fix orm messages
  • Loading branch information
wguanicedew authored Jan 5, 2024
2 parents 3c0c5af + 355487c commit 13e7d37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main/lib/idds/core/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ def delete_messages(messages, session=None):


@transactional_session
def update_messages(messages, session=None):
def update_messages(messages, min_request_id=None, session=None):
"""
Update all messages status with the given IDs.
:param messages: The messages to be updated as a list of dictionaries.
"""
return orm_messages.update_messages(messages=messages, session=session)
return orm_messages.update_messages(messages=messages, min_request_id=min_request_id, session=session)


@transactional_session
Expand Down
2 changes: 1 addition & 1 deletion main/lib/idds/orm/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def retrieve_messages(bulk_size=1000, msg_type=None, status=None, source=None,
query = query.filter_by(request_id=request_id)
else:
if min_request_id:
query = query.filter_by(request_id >= min_request_id)
query = query.filter(models.Message.request_id >= min_request_id)
if workload_id is not None:
query = query.filter_by(workload_id=workload_id)
if transform_id is not None:
Expand Down
2 changes: 2 additions & 0 deletions main/lib/idds/tests/panda_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
task_ids = []
task_ids = [i for i in range(166636, 166778)]
task_ids = [166253, 166254]
task_ids = [167759]
task_ids = [i for i in range(167759, 167774)]
for task_id in task_ids:
print("Killing %s" % task_id)
ret = Client.killTask(task_id, verbose=True)
Expand Down

0 comments on commit 13e7d37

Please sign in to comment.