-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
migrations=( | ||
"helfi_rekry_images:all" | ||
"helfi_rekry_videos:all" | ||
"helfi_rekry_task_areas:fi" | ||
"helfi_rekry_task_areas:sv" | ||
"helfi_rekry_task_areas:en" | ||
"helfi_rekry_organizations:fi" | ||
"helfi_rekry_organizations:sv" | ||
"helfi_rekry_organizations:en" | ||
"helfi_rekry_employments:all" | ||
"helfi_rekry_employment_types:all" | ||
) | ||
|
||
echo "Starting job listing migrations: $(date)" | ||
while true | ||
do | ||
echo "Running job listing migrations: $(date)" | ||
|
||
for migration in "${migrations[@]}"; do | ||
# Allow migrations to be run every 1.5 hours, reset stuck migrations every 12 hours. | ||
drush migrate:import "$migration" --reset-threshold 43200 --interval 5400 --no-progress | ||
done | ||
|
||
drush helfi-rekry-content:clean-expired-listings | ||
|
||
# Sleep for 3 hours. | ||
sleep 10800 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,19 @@ | ||
#!/bin/bash | ||
|
||
migrations=( | ||
"helfi_rekry_images:all" | ||
"helfi_rekry_videos:all" | ||
"helfi_rekry_task_areas:fi" | ||
"helfi_rekry_task_areas:sv" | ||
"helfi_rekry_task_areas:en" | ||
"helfi_rekry_organizations:fi" | ||
"helfi_rekry_organizations:sv" | ||
"helfi_rekry_organizations:en" | ||
"helfi_rekry_employments:all" | ||
"helfi_rekry_employment_types:all" | ||
"helfi_rekry_jobs:all" | ||
) | ||
|
||
echo "Starting job listing migrations: $(date)" | ||
echo "Starting job listing:changed migrations: $(date)" | ||
while true | ||
do | ||
echo "Running job listing migrations: $(date)" | ||
echo "Running job listing:changed migrations: $(date)" | ||
|
||
for migration in "${migrations[@]}"; do | ||
# Allow migrations to be run every 1.5 hours, reset stuck migrations every 12 hours. | ||
drush migrate:import "$migration" --reset-threshold 43200 --interval 5400 --no-progress | ||
# Allow migrations to be run every 10 minutes, reset stuck migrations every 30 minutes. | ||
drush migrate:import "$migration" --reset-threshold 1800 --interval 600 --no-progress | ||
done | ||
|
||
drush helfi-rekry-content:clean-expired-listings | ||
|
||
# Sleep for 3 hours. | ||
sleep 10800 | ||
# Sleep for 15 minutes. | ||
sleep 900 | ||
done |