[ux] also inform the user once we've stopped waiting for the lock

This commit is contained in:
Laurent Peuch 2019-07-25 04:15:52 +02:00
parent 96a0774736
commit ca49ffefc1
2 changed files with 6 additions and 1 deletions

View file

@ -53,5 +53,6 @@
"download_bad_status_code": "{url:s} returned status code {code:s}",
"command_unknown": "Command '{command:s}' unknown ?",
"warn_the_user_about_waiting_lock": "Another YunoHost command is running right now, we are waiting for it to finish before running this one",
"warn_the_user_about_waiting_lock_again": "Still waiting..."
"warn_the_user_about_waiting_lock_again": "Still waiting...",
"warn_the_user_that_lock_is_acquired": "the other command just complet, now starting this command"
}

View file

@ -504,6 +504,10 @@ class MoulinetteLock(object):
# Wait before checking again
time.sleep(self.interval)
# we have warned the user that we were waiting, for better UX also them
# that we have stop waiting and that the command is processing now
if warning_treshold != 15:
logger.warning(moulinette.m18n.g('warn_the_user_that_lock_is_acquired'))
logger.debug('lock has been acquired')
self._locked = True