Skip to content

Commit 7fc5026

Browse files
committed
[bug/gh-71] implemented loop that continuously pings eDrop until it responds successfully
1 parent bf0af02 commit 7fc5026

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Dockerfile-prod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED=1
44

55
WORKDIR /edrop
66

7-
RUN apt-get update && apt-get install -y supervisor && \
7+
RUN apt-get update && apt-get install -y supervisor netcat-traditional && \
88
apt-get clean && rm -rf /var/lib/apt/lists/*
99

1010
COPY edrop-gunicorn.sh /edrop/edrop-gunicorn.sh

edrop-cron.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
1515
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
1616
mkdir -p /edrop/logs
1717

18-
sleep 140
19-
# URL="127.0.0.1"
20-
# until ping -c 1 127.0.0.1 &> /dev/null; do
21-
# echo "Waiting for eDrop to start up..."
22-
# sleep 10
23-
# done
24-
# echo "eDrop has started successfully"
18+
while ! nc -z 127.0.0.1 8000; do echo "eDrop not responding"; sleep 5; done
19+
echo "eDrop has started successfully"
2520

2621
# start the cron job
2722
python manage.py runapscheduler

0 commit comments

Comments
 (0)