Skip to content

Commit

Permalink
Merge pull request #545 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 4e32508 + 2c0886f commit 783e3fd
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
@@ -1,23 +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 783e3fd

Please sign in to comment.