未验证 提交 de6bac41 编写于 作者: C chenjian 提交者: GitHub

fix bug for interrupting failure in windows (#1218)

上级 799dba68
......@@ -14,12 +14,12 @@
# =======================================================================
import os
import re
from multiprocessing import Process
from multiprocessing import Queue
from threading import Lock
from threading import Thread
import packaging.version
from multiprocess import Process
from multiprocess import Queue
from .parser.const_description import * # noqa: F403
from .parser.event_node import load_profiler_json
......
......@@ -17,6 +17,7 @@ import json
import multiprocessing
import os
import re
import signal
import sys
import threading
import time
......@@ -78,6 +79,9 @@ def create_app(args): # noqa: C901
lang = request.accept_languages.best_match(support_language)
return lang
signal.signal(
signal.SIGINT, signal.SIG_DFL
) # we add this to prevent SIGINT not work in multiprocess queue waiting
babel = Babel(app, locale_selector=get_locale) # noqa:F841
# Babel api from flask_babel v3.0.0
api_call = create_api_call(args.logdir, args.model, args.cache_timeout)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册