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