mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
fix: [background update] fix logger
This commit is contained in:
parent
ff2b620647
commit
780b4f9f9c
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue