Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-9399: Remove deployment checks from cron entrypoint #313

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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