Skip to content

Commit

Permalink
增加后台常驻OCR进程的关闭逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroi-sora committed Sep 9, 2022
1 parent 694e34c commit 0de5320
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ocrEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ def stop(self):

def stopByMode(self):
"""根据配置决定停止引擎"""
# self.stop()
n = Config.get('ocrRunModeName')
modeDict = Config.get('ocrRunMode')
if n in modeDict.keys():
mode = modeDict[n]
print(f'引擎停止策略:{mode}')
if mode == 0: # 按需关闭
self.stop()

def run(self, path):
if not self.ocr:
Expand Down

0 comments on commit 0de5320

Please sign in to comment.