deal db session in celery worker (#17549)

This commit is contained in:
Jyong 2025-04-07 20:31:26 +08:00 committed by GitHub
commit c8145ce581
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 104 additions and 25 deletions

View file

@ -127,3 +127,5 @@ def batch_create_segment_to_index_task(
except Exception:
logging.exception("Segments batch created index failed")
redis_client.setex(indexing_cache_key, 600, "error")
finally:
db.session.close()