Skip to content

Commit

Permalink
Merge pull request #215 from City-of-Helsinki/UHF-9576-linked-events-…
Browse files Browse the repository at this point in the history
…keywords

UHF-9576: Add cron job for linked events migration
  • Loading branch information
hyrsky authored Mar 14, 2024
2 parents 1ed1516 + 985b919 commit 90e9fa7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"phpstan/extension-installer": true
},
"audit": {
"abandoned": "report"
}
},
"extra": {
Expand Down
2 changes: 2 additions & 0 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ echo "Starting cron: $(date)"

# Uncomment this to enable TPR migration cron
#exec "/crons/migrate-tpr.sh" &
# Uncomment this to enable linked events migrations cron
#exec "/crons/linked-events.sh" &
# Uncomment this to enable Varnish purge cron
#exec "/crons/purge-queue.sh" &
# Uncomment this to enable automatic translation updates.
Expand Down
10 changes: 10 additions & 0 deletions docker/openshift/crons/linked-events.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

while true
do
# Allow migrations to be run every 3 hours and reset stuck migrations every 12 hours.
drush migrate:import linked_events_keywords --interval 10800 --reset-threshold 43200 --no-progress

# Sleep for 12 hours
sleep 86400
done

0 comments on commit 90e9fa7

Please sign in to comment.