Skip to content

Commit

Permalink
UHF-X: tighten migration interval
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysteerio committed Feb 8, 2023
1 parent 3e7b61d commit 5001fea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exec "/crons/purge-queue.sh" &
exec "/crons/content-scheduler.sh" &
# Job listing migration cron
exec "/crons/migrate-job-listings.sh" &
exec "/crons/migrate-changed-job-listings.sh" &

while true
do
Expand Down
16 changes: 8 additions & 8 deletions docker/openshift/crons/migrate-changed-job-listings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ do
reset_status

echo "Running job listing:changed migrations: $(date)"
if run_migrate "helfi_rekry_jobs:all"; then
if run_migrate "helfi_rekry_jobs:changed"; then
echo "Running job listing:changed migrations: $(date)"
drush migrate:import helfi_rekry_jobs:all --update
drush migrate:import helfi_rekry_jobs:changed --update
fi

if run_migrate "helfi_rekry_jobs:all_sv"; then
if run_migrate "helfi_rekry_jobs:changed_sv"; then
echo "Running job listing:changed migrations (sv): $(date)"
drush migrate:import helfi_rekry_jobs:all_sv --update
drush migrate:import helfi_rekry_jobs:changed_sv --update
fi

if run_migrate "helfi_rekry_jobs:all_en"; then
if run_migrate "helfi_rekry_jobs:changed_en"; then
echo "Running job listing:changed migrations (en): $(date)"
drush migrate:import helfi_rekry_jobs:all_en --update
drush migrate:import helfi_rekry_jobs:changed_en --update
fi

# Reset migrate status if migrate has been running for more
Expand All @@ -66,6 +66,6 @@ do
# Never skip migrate after first time.
SKIP_MIGRATE=

# Sleep for 1 hour.
sleep 3600
# Sleep for ½ hour.
sleep 1800
done

0 comments on commit 5001fea

Please sign in to comment.