forked from department-of-veterans-affairs/va.gov-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks-periodic.yml
176 lines (155 loc) · 6.09 KB
/
tasks-periodic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# These are tasks that are called by Jenkins similar to cron..
version: '3'
dotenv: ['.env']
tasks:
# Run with: ./bin/task --taskfile=tasks-periodic.yml daily
# http://jenkins.vfs.va.gov/job/cms/job/cms-daily
daily:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
va/background/daily/migrate_copy/va_forms_csv_source
va/background/daily/migrate/va_forms
va/background/daily/update/taxonomy_entity_index
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
# Run with: ./bin/task --taskfile=tasks-periodic.yml daily_0800
# http://jenkins.vfs.va.gov/job/cms/job/cms-daily-two
# Similar to daily but later in the day.
daily_0800:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
va/background/daily_0800/migrate/health_care_local_facility
va/background/daily_0800/migrate/vet_centers_facility
va/background/daily_0800/migrate/vba_facility
va/background/daily_0800/migrate/nca_facility
va/background/daily_0800/migrate/flag_removed_facilities
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
# Run with: ./bin/task --taskfile=tasks-periodic.yml periodic
# http://jenkins.vfs.va.gov/job/cms/job/cms-periodic
periodic:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
"va/background/periodic/migrate/facility_status"
"va/background/periodic/check_content_release_stale"
"va/background/periodic/check_scheduled_content_release"
"va/background/periodic/cron"
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
# Run with: ./bin/task --taskfile=tasks-periodic.yml every_minute
# http://jenkins.vfs.va.gov/job/cms/job/cms-every-minute
every_minute:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
"va/background/periodic/send_datadog_metrics"
"va/background/periodic/content_release_queues"
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
va/background/daily/migrate_copy/va_forms_csv_source:
desc: This is because we cannot access the server on the SOCKS proxy right now.
cmds:
- |
cd docroot/sites/default/files/migrate_source
curl https://vaww.webdevi.va.gov/vaforms/VAForms_DataExtract/VAForms_FormsData.txt -L --output va_forms_data.csv
va/background/daily/migrate/va_forms:
desc: Migrate va forms.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_form
- drush $DRUSH_ALIAS migrate:import va_node_form
va/background/daily/update/taxonomy_entity_index:
desc: Update the taxonomy_entity_index nightly.
cmds:
- drush $DRUSH_ALIAS taxonomy_entity_index:rebuild
va/background/daily_0800/migrate/health_care_local_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_health_care_local_facility
- drush $DRUSH_ALIAS migrate:import va_node_health_care_local_facility
va/background/daily_0800/migrate/vet_centers_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_mvc
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_mvc
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_os
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_os
va/background/daily_0800/migrate/vba_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vba
- drush $DRUSH_ALIAS migrate:import va_node_facility_vba
va/background/daily_0800/migrate/nca_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_nca
- drush $DRUSH_ALIAS migrate:import va_node_facility_nca
va/background/daily_0800/migrate/flag_removed_facilities:
desc: These flagging process is to run once nightly.
cmds:
- drush $DRUSH_ALIAS va_gov_migrate:flag-missing-facilities
va/background/periodic/migrate/facility_status:
desc: Run migrate facility status to run every 15 min as called by Jenkins.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_health_care_local_facility_status
- drush $DRUSH_ALIAS migrate:import va_node_health_care_local_facility_status
va/background/periodic/cron:
desc: Run cron every 15 min as called by Jenkins.
cmds:
- drush $DRUSH_ALIAS core:cron
va/background/periodic/content_release_queues:
desc: Process content release queues every minute.
cmds:
- drush $DRUSH_ALIAS advancedqueue:queue:process content_release
va/background/periodic/check_scheduled_content_release:
desc: Ensure scheduled content releases are requested during business hours.
cmds:
- drush $DRUSH_ALIAS va-gov:content-release:check-scheduled
va/background/periodic/check_content_release_stale:
desc: Ensure we don't have a stale release state.
cmds:
- drush $DRUSH_ALIAS va-gov:content-release:check-stale
va/background/periodic/send_datadog_metrics:
desc: Send metrics to datadog.
cmds:
- drush $DRUSH_ALIAS va-gov:metrics:send
va/noop:
desc: Placeholder command
cmds:
- 'true'