mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Let ThreadPool exit gracefully. (#3653)
### What problem does this PR solve? #3646 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -492,6 +492,7 @@ def report_status():
|
||||
logging.exception("report_status got exception")
|
||||
time.sleep(30)
|
||||
|
||||
|
||||
def analyze_heap(snapshot1: tracemalloc.Snapshot, snapshot2: tracemalloc.Snapshot, snapshot_id: int, dump_full: bool):
|
||||
msg = ""
|
||||
if dump_full:
|
||||
@ -508,6 +509,7 @@ def analyze_heap(snapshot1: tracemalloc.Snapshot, snapshot2: tracemalloc.Snapsho
|
||||
msg += '\n'.join(stat.traceback.format())
|
||||
logging.info(msg)
|
||||
|
||||
|
||||
def main():
|
||||
settings.init_settings()
|
||||
background_thread = threading.Thread(target=report_status)
|
||||
|
||||
Reference in New Issue
Block a user