mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -34,6 +34,11 @@ class ModuleBase:
|
||||
"""
|
||||
if isinstance(config, AzurLaneConfig):
|
||||
self.config = config
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
if task is not None:
|
||||
self.config.init_task(task)
|
||||
>>>>>>> 24aa3e00bd9af9a6a050df54c6a0cef959a9c6c0
|
||||
elif isinstance(config, str):
|
||||
self.config = AzurLaneConfig(config, task=task)
|
||||
else:
|
||||
@@ -73,6 +78,12 @@ class ModuleBase:
|
||||
if not self.config.is_actual_task:
|
||||
logger.info('No actual task bound, skip early_ocr_import')
|
||||
return
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
if self.config.task.command in ['Daemon', 'OpsiDaemon']:
|
||||
logger.info('No ocr in daemon task, skip early_ocr_import')
|
||||
return
|
||||
>>>>>>> 24aa3e00bd9af9a6a050df54c6a0cef959a9c6c0
|
||||
|
||||
def do_ocr_import():
|
||||
# Wait first image
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import datetime, timedelta
|
||||
from functools import wraps
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
# def timeout(_timeout):
|
||||
# threadstop = thread._thread__stop
|
||||
# from threading import thread
|
||||
@@ -70,6 +71,8 @@ def timeout(func, timeout_sec=30.0, *args, **kwargs):
|
||||
return function_timeout(func)
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> 24aa3e00bd9af9a6a050df54c6a0cef959a9c6c0
|
||||
def timer(function):
|
||||
@wraps(function)
|
||||
def function_timer(*args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user