Skip to content
Snippets Groups Projects
Commit f8b57d8b authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3261648 by yas, baldwinlouie: Add cron job for running drush queue-run...

Issue #3261648 by yas, baldwinlouie: Add cron job for running drush queue-run *_update_resources_queue in Cloud Orchestrator distribution
parent 7e5cd608
No related branches found
No related tags found
1 merge request!630Issue #3261648: Add cron job for running drush queue-run *_update_resources_queue in Cloud Orchestrator distribution
......@@ -346,6 +346,8 @@ Resources:
sudo docker exec -w $DOCKER_DIR $CONTAINER_NAME sh -c "drush -y cr"
cp /etc/crontab /tmp/
echo "*/5 * * * * pi sudo docker exec -w /var/www/cloud_orchestrator cloud-orchestrator sh -c 'drush cron' > /dev/null 2>&1" >> /tmp/crontab
echo '*/5 * * * * ubuntu cd /var/www/html/web && for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "${MODULE}" | awk '\''{print $1}'\''); if [ "${QUEUE}" ]; then drush queue-run "${QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done' >> /tmp/crontab
sudo cp /tmp/crontab /etc/
# CFn helper script installation
......
......@@ -342,7 +342,8 @@ Resources:
\$settings['cache']['default'] = 'cache.backend.memcache';
EOF
sudo docker exec -w $DOCKER_DIR $CONTAINER_NAME sh -c "drush -y cr"
{ sudo -u ubuntu echo "*/5 * * * * ubuntu sudo docker exec -w /var/www/cloud_orchestrator cloud-orchestrator sh -c 'drush cron' > /dev/null 2>&1 "; } > /etc/crontab
{ sudo -u ubuntu echo "*/5 * * * * ubuntu sudo docker exec -w /var/www/cloud_orchestrator cloud-orchestrator sh -c 'drush cron' > /dev/null 2>&1"; } > /etc/crontab
{ sudo -u ubuntu echo '*/5 * * * * ubuntu cd /var/www/html/web && for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "${MODULE}" | awk '\''{print $1}'\''); if [ "${QUEUE}" ]; then drush queue-run "${QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done'; } >> /etc/crontab;
# CFn helper script installation
cd /tmp
......
......@@ -366,6 +366,7 @@ Resources:
# After install setup cron
{ echo "*/5 * * * * ubuntu cd /var/www/cloud_orchestrator && /usr/local/bin/drush cron > /dev/null 2>&1"; } > /etc/crontab
{ echo '*/5 * * * * ubuntu cd /var/www/html/web && for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "${MODULE}" | awk '\''{print $1}'\''); if [ "${QUEUE}" ]; then drush queue-run "${QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done'; } >> /etc/crontab
# Switch to Claro Admin
cd /var/www/cloud_orchestrator
......
......@@ -377,6 +377,7 @@ Resources:
# After install setup cron
{ echo "*/5 * * * * ubuntu cd /var/www/cloud_orchestrator && /usr/local/bin/drush cron > /dev/null 2>&1"; } > /etc/crontab
{ echo '*/5 * * * * ubuntu cd /var/www/html/web && for MODULE in '\''aws_cloud'\'' '\''k8s'\'' '\''openstack'\'' '\''vmware'\'' '\''terraform'\''; do export QUEUE=$(drush queue-list | grep "${MODULE}" | awk '\''{print $1}'\''); if [ "${QUEUE}" ]; then drush queue-run "${QUEUE}" --time-limit=120 > /dev/null 2>&1; fi done'; } >> /etc/crontab
# Switch to Claro Admin
cd /var/www/cloud_orchestrator
......
......@@ -141,4 +141,3 @@ Outputs:
Value: !Ref PrivateSubnet1
PrivateSubnet2:
Value: !Ref PrivateSubnet2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment