File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,21 @@ export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
1515export PYTHONPATH=$DJANGODIR :$PYTHONPATH
1616mkdir -p /edrop/logs
1717
18+ # When a new container is being created, eDROP Connector takes a long time to startup because all dependencies
19+ # need to be installed first. The cron job, however, needs all dependencies to be installed before it can start up.
20+ # Since we know that once eDROP Connector is up and running, all dependencies are installed, we just wait till we
21+ # get a 200 response from the web app before starting the cron job.
22+ # Using the autorestart property of Supervisor does not seem to work when deployed in production, hence this work around.
1823while true ; do
1924 sleep 5;
2025 http_response=$( curl -s -o /dev/null -I -w " %{http_code}\n" http://localhost:8000/$APP_ROOT ) ;
2126 if [ $http_response == " 200" ]; then
2227 break
2328 else
24- echo " eDrop not responding"
29+ echo " eDROP Connector is not yet responding. "
2530 fi
2631done
27- echo " eDrop has started successfully"
32+ echo " eDROP Connector has started successfully"
2833
2934# start the cron job
3035python manage.py runapscheduler
You can’t perform that action at this time.
0 commit comments