readthedocs.org
098fc34a - Deprecation: improve Celery task db query (#10414)

Commit
2 years ago
Deprecation: improve Celery task db query (#10414) * Deprecation: improve Celery task db query This commit excludes the users that already have an unread notification with this message. This is only to avoid performing db queries for users where our notification backend won't add a new notification anyways. This will improve the performance of this task making it to run faster (hopefully). * Deprecation: improve slow db query Instead of passing 82k slugs on each query to get the user's projects, we perform a set() intersection in Python which is fast. This reduces the time for this query in a pretty noticeable way. * Deprecation: adapt comment * Minor fix * Remove `.exclude` of unread notifications This will interfere with the logic for sending email notifications. We do want to send an email even if the user didn't read the onsite notification.
Author
Parents
Loading