Skip to content

Commit

Permalink
Rules: update query to SQLAlchemy 2.0 syntax; #6057
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Feb 27, 2024
1 parent 610f03d commit 9e1d03e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rucio/core/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2420,7 +2420,8 @@ def get_evaluation_backlog(expiration_time: int = 600, *, session: "Session") ->

cached_backlog = REGION.get('rule_evaluation_backlog', expiration_time=expiration_time)
if cached_backlog is NO_VALUE:
result = session.query(func.count(models.UpdatedDID.created_at), func.min(models.UpdatedDID.created_at)).one()
stmt = select(func.count(models.UpdatedDID.created_at), func.min(models.UpdatedDID.created_at))
result = session.execute(stmt).scalars().one()
REGION.set('rule_evaluation_backlog', result)
return result
else:
Expand Down

0 comments on commit 9e1d03e

Please sign in to comment.