mirror of https://github.com/CIRCL/AIL-framework
fix: [background update] fix logger
parent
ff2b620647
commit
780b4f9f9c
|
@ -19,13 +19,13 @@ sys.path.append(os.environ['AIL_BIN'])
|
||||||
##################################
|
##################################
|
||||||
# Import Project packages
|
# Import Project packages
|
||||||
##################################
|
##################################
|
||||||
|
from lib import ail_logger
|
||||||
from lib import ail_updates
|
from lib import ail_updates
|
||||||
|
|
||||||
logging.config.dictConfig(ail_logger.get_config(name='updates'))
|
logging.config.dictConfig(ail_logger.get_config(name='updates'))
|
||||||
def launch_background_upgrade(version):
|
def launch_background_upgrade(version):
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
update.set_error('Error Updater Script')
|
logger.warning(f'launching background update {version}')
|
||||||
print('launching background update', version)
|
|
||||||
update = ail_updates.AILBackgroundUpdate(version)
|
update = ail_updates.AILBackgroundUpdate(version)
|
||||||
nb_done = update.get_nb_scripts_done()
|
nb_done = update.get_nb_scripts_done()
|
||||||
update.start()
|
update.start()
|
||||||
|
@ -61,6 +61,7 @@ def launch_background_upgrade(version):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
update.end()
|
update.end()
|
||||||
|
logger.warning(f'ending background update {version}')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue