Fix plugin loading sync and resolve regression in setting_menu; bump version
This commit is contained in:
@@ -158,19 +158,9 @@ class PluginManager:
|
||||
try:
|
||||
mod_plugin_load = getattr(entity['P'], 'plugin_load_celery')
|
||||
if mod_plugin_load:
|
||||
def func(mod_plugin_load, key):
|
||||
try:
|
||||
load_start_time = time.time()
|
||||
F.logger.info(f'[!] plugin_load_celery threading start : [{key}]')
|
||||
mod_plugin_load()
|
||||
load_elapsed_time = time.time() - load_start_time
|
||||
F.logger.info(f'[!] plugin_load_celery threading end : [{key}] ({load_elapsed_time:.3f}s)')
|
||||
except Exception as e:
|
||||
F.logger.error(f"Exception:{str(e)}")
|
||||
F.logger.error(traceback.format_exc())
|
||||
t = threading.Thread(target=func, args=(mod_plugin_load, key))
|
||||
t.setDaemon(True)
|
||||
t.start()
|
||||
F.logger.info(f'[!] plugin_load_celery start : [{key}]')
|
||||
mod_plugin_load()
|
||||
F.logger.info(f'[!] plugin_load_celery end : [{key}]')
|
||||
except Exception as e:
|
||||
F.logger.error(f"Exception:{str(e)}")
|
||||
F.logger.error(traceback.format_exc())
|
||||
@@ -216,8 +206,8 @@ class PluginManager:
|
||||
if mod_menu and cls.all_package_list[key]['loading'] != False:
|
||||
cls.plugin_menus[key]= {'menu':mod_menu, 'match':False}
|
||||
setting_menu = getattr(entity['P'], 'setting_menu')
|
||||
setting_menu['plugin'] = entity['P'].package_name
|
||||
if setting_menu != None and cls.all_package_list[key]['loading'] != False:
|
||||
setting_menu['plugin'] = entity['P'].package_name
|
||||
F.logger.info(f"확장 설정 : {key}")
|
||||
cls.setting_menus.append(setting_menu)
|
||||
except Exception as exception:
|
||||
|
||||
Reference in New Issue
Block a user