diff --git a/make_post_sell/models/shop.py b/make_post_sell/models/shop.py index ef0dc6a..69437a0 100644 --- a/make_post_sell/models/shop.py +++ b/make_post_sell/models/shop.py @@ -1,6 +1,7 @@ import json import logging import threading +import time import uuid from sqlalchemy import Column, BigInteger, Boolean, Unicode, UnicodeText, func @@ -665,6 +666,8 @@ def compute_discovery_ring(shop): score = len(accumulated_stems & p_stems) / len(union) else: score = 0 + # Yield GIL so uwsgi workers can serve requests + time.sleep(0) # Tiebreak: highest score, then newest, then ID if (score > best_score or