View | Details | Raw Unified | Return to bug 253289
Collapse All | Expand All

(-)www/gitlab-ce/files/gitlab.in (-7 / +9 lines)
Lines 43-48 Link Here
43
: ${gitlab_workhorse_addr:="127.0.0.1:8181"}
43
: ${gitlab_workhorse_addr:="127.0.0.1:8181"}
44
: ${gitlab_mail_room_enable:="NO"}
44
: ${gitlab_mail_room_enable:="NO"}
45
: ${gitlab_allow_conflicts:="NO"}
45
: ${gitlab_allow_conflicts:="NO"}
46
: ${gitlab_wait:="120"}
46
47
47
load_rc_config $name
48
load_rc_config $name
48
49
Lines 218-235 Link Here
218
## Called when we have started the two processes and are waiting for their pid files.
219
## Called when we have started the two processes and are waiting for their pid files.
219
wait_for_pids(){
220
wait_for_pids(){
220
  # We are sleeping a bit here mostly because sidekiq is slow at writing its pid
221
  # We are sleeping a bit here mostly because sidekiq is slow at writing its pid
221
  i=0;
222
  i=0
222
  while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || [ ! -f $gitlab_workhorse_pid_path ] || { [ "$mail_room_enabled" = true ] && [ ! -f $mail_room_pid_path ]; } || { [ "$gitlab_pages_enabled" = true ] && [ ! -f $gitlab_pages_pid_path ]; } || { [ "$gitaly_enabled" = true ] && [ ! -f $gitaly_pid_path ]; }; do
223
  while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || [ ! -f $gitlab_workhorse_pid_path ] || { [ "$mail_room_enabled" = true ] && [ ! -f $mail_room_pid_path ]; } || { [ "$gitlab_pages_enabled" = true ] && [ ! -f $gitlab_pages_pid_path ]; } || { [ "$gitaly_enabled" = true ] && [ ! -f $gitaly_pid_path ]; }; do
223
    sleep 0.1;
224
    echo -n "."
224
    i=$((i+1))
225
    if [ $((i)) = "$gitlab_wait" ]; then
225
    if [ $((i%10)) = 0 ]; then
226
      echo
226
      echo -n "."
227
      echo "Waited ${i}s for the processes to write their pids, something probably went wrong."
227
    elif [ $((i)) = 601 ]; then
228
      echo "Waited 60s for the processes to write their pids, something probably went wrong."
229
      exit 1;
228
      exit 1;
230
    fi
229
    fi
230
    sleep 1
231
    i=$((i+1))
231
  done
232
  done
232
  echo
233
  echo
234
  echo "Started in ${i}s."
233
}
235
}
234
236
235
# We use the pids in so many parts of the script it makes sense to always check them.
237
# We use the pids in so many parts of the script it makes sense to always check them.

Return to bug 253289