fix: [background update] fix logger

pull/604/head
Terrtia 2023-07-12 14:37:59 +02:00
parent ff2b620647
commit 780b4f9f9c
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 3 additions and 2 deletions

View File

@ -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__":