diff --git a/docker/openshift/crons/base.sh b/docker/openshift/crons/base.sh index 620a5576..e42f5b5b 100644 --- a/docker/openshift/crons/base.sh +++ b/docker/openshift/crons/base.sh @@ -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 diff --git a/docker/openshift/crons/migrate-changed-job-listings.sh b/docker/openshift/crons/migrate-changed-job-listings.sh index 3dede52c..549be9e5 100644 --- a/docker/openshift/crons/migrate-changed-job-listings.sh +++ b/docker/openshift/crons/migrate-changed-job-listings.sh @@ -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 @@ -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