Skip to content

Commit

Permalink
Merge pull request #325 from City-of-Helsinki/UHF-9399
Browse files Browse the repository at this point in the history
UHF-9399: Remove deployment checks from cron entrypoint
  • Loading branch information
khalima authored Dec 4, 2023
2 parents c48e367 + 06bfc43 commit ee5f8d0
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/bin/bash

# Checking if a new deployment is in progress, as we should not run cron while deploying.
if [ ! -n "$OPENSHIFT_BUILD_NAME" ]; then
echo "OPENSHIFT_BUILD_NAME is not defined. Exiting early."
exit 1
fi

while [ "$(drush state:get deploy_id)" != "$OPENSHIFT_BUILD_NAME" ]
do
echo "Current deploy_id $OPENSHIFT_BUILD_NAME not found in state. Probably a deployment is in progress - waiting for completion..."
sleep 60
done

while [ "$(drush state:get system.maintenance_mode)" = "1" ]
do
echo "Maintenance mode on. Probably a deployment is in progress - waiting for completion..."
sleep 60
done
source /init.sh

echo "Starting cron: $(date)"

Expand Down

0 comments on commit ee5f8d0

Please sign in to comment.