mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
[fix] No infinite loop
This commit is contained in:
parent
8a5095f166
commit
c9f3c1ae34
1 changed files with 8 additions and 0 deletions
|
@ -317,8 +317,16 @@ then
|
|||
|
||||
# https://docs.gitlab.com/ee/update/#checking-for-background-migrations-before-upgrading
|
||||
if dpkg --compare-versions "$current_version" "ge" "12.9"; then
|
||||
|
||||
counter=0
|
||||
while ! gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'
|
||||
do
|
||||
counter=$((counter + 1))
|
||||
if [ $counter -gt 1200 ]
|
||||
then
|
||||
ynh_print_warn --message="Timeout: a background migration runs for at least 20min !"
|
||||
break
|
||||
fi
|
||||
ynh_print_info --message="Wait for the migration in the background to finish"
|
||||
sleep 1
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue