Skip to content

Commit 8392fcf

Browse files
committed
fix(signal): remove win incompatible signal
1 parent 253fdb1 commit 8392fcf

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

easyquant/main_engine.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ def __init__(self, broker=None, need_data=None, quotation_engines=None,
8989
self.after_shutdown = [] # 关闭引擎后的 shutdown
9090
self.shutdown_signals = [
9191
signal.SIGINT, # 键盘信号
92-
signal.SIGHUP, # nohup 命令
9392
signal.SIGTERM, # kill 命令
9493
]
9594
if sys.platform != 'win32':
96-
self.shutdown_signals.append(signal.SIGQUIT)
95+
self.shutdown_signals.extend([signal.SIGHUP, signal.SIGQUIT])
9796

9897
for s in self.shutdown_signals:
9998
# 捕获退出信号后的要调用的,唯一的 shutdown 接口
@@ -202,20 +201,12 @@ def _load_strategy(self):
202201
print(e)
203202

204203
def get_strategy(self, name):
205-
"""
206-
:param name:
207-
:return:
208-
"""
209204
for strategy in self.strategy_list:
210205
if strategy.name == name:
211206
return strategy
212207
return None
213208

214209
def get_quotation(self, eventype):
215-
"""
216-
:param name:
217-
:return:
218-
"""
219210
for quo in self.quotation_engines:
220211
if quo.EventType == eventype:
221212
return quo

0 commit comments

Comments
 (0)