diff --git a/docker/openshift/crons/base.sh b/docker/openshift/crons/base.sh index 6d31fe58d..cc4c7ae00 100644 --- a/docker/openshift/crons/base.sh +++ b/docker/openshift/crons/base.sh @@ -21,6 +21,7 @@ exec "/crons/purge-queue.sh" & exec "/crons/update-translations.sh" & exec "/crons/content-scheduler.sh" & exec "/crons/invalidate-tags-kymp.sh" & +exec "/crons/pubsub.sh" & while true do diff --git a/docker/openshift/crons/pubsub.sh b/docker/openshift/crons/pubsub.sh new file mode 100755 index 000000000..d5d0fc16f --- /dev/null +++ b/docker/openshift/crons/pubsub.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "Running PubSub daemon: $(date +'%Y-%m-%dT%H:%M:%S%:z')" + +i=0 +# Attempt to start this service five times. +until [ $i -gt 5 ] +do + drush helfi:azure:pubsub-listen + + if [[ "$?" -ne 0 ]]; then + ((i=i+1)) + sleep 10 + fi +done