Skip to content

Commit

Permalink
Auth: Remove unnecessary dialect check and pass hash variable directl…
Browse files Browse the repository at this point in the history
…y to filter_thread_work

For more information, see: rucio#6497 (comment)
  • Loading branch information
rdimaio committed May 2, 2024
1 parent 2c389be commit b316c12
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/rucio/core/account_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ def get_updated_account_counters(total_workers, worker_number, *, session: "Sess
query = session.query(models.UpdatedAccountCounter.account, models.UpdatedAccountCounter.rse_id).\
distinct(models.UpdatedAccountCounter.account, models.UpdatedAccountCounter.rse_id)

if session.bind.dialect.name == 'oracle':
hash_variable = 'CONCAT(account, rse_id)'''
else:
hash_variable = 'concat(account, rse_id)'

query = filter_thread_work(session=session, query=query, total_threads=total_workers, thread_id=worker_number, hash_variable=hash_variable)
query = filter_thread_work(session=session, query=query, total_threads=total_workers, thread_id=worker_number, hash_variable='CONCAT(account, rse_id)')

return query.all()

Expand Down

0 comments on commit b316c12

Please sign in to comment.