Skip to content

enable x-ray segments for user management tools

Alexander Pace requested to merge declutter-ldap-updates into master

Adding new members and clearing inactive alerts was taking forever in the AWS instances and required filtering the endless

No segment found, cannot begin subsegment execute.
cannot find the current segment/subsegment, please make sure you have a segment open

warnings. Turns out they were related, go figure. I assume there must be some sort of retry logic, a timeout, or something under the hood that was slowing things down when xray couldn't find a segment before quitting. These changes initialize an xray segment for the two heaviest management tasks.

Before:

# time python3 /app/gracedb_project/manage.py update_user_accounts_from_ligo_ldap ligo
(lots of noisy output)

real    22m40.205s
user    16m43.103s
sys 0m16.365s

And after:

# time python3 /app/gracedb_project/manage.py update_user_accounts_from_ligo_ldap ligo

real    5m11.909s
user    2m43.026s
sys 0m9.391s

yay

Merge request reports