|
1 | 1 | # frozen_string_literal: true |
2 | 2 |
|
3 | 3 | # Trigger OEG notices for missing families |
4 | | -# Option1: rails runner script/catch_up_oeg_trigger.rb "oeg" "2025-10-23" "" "retrigger_for_all_non_determined_applications" 2026 |
5 | | -# Option2: rails runner script/catch_up_oeg_trigger.rb "oeg" "2025-10-23" "12345,67890" "" 2026 |
| 4 | +# Option1: rails runner script/catch_up_oeg_trigger.rb "2025-10-23" "" "retrigger_for_all_non_determined_applications" 2026 |
| 5 | +# Option2: rails runner script/catch_up_oeg_trigger.rb "2025-10-23" "12345,67890" "" 2026 |
6 | 6 |
|
7 | | -notice_type = ARGV[0]&.downcase |
8 | | -from_date = ARGV[1]&.to_date |
9 | | -primary_person_hbx_ids_list = ARGV[2]&.split(",") || [] |
10 | | -retrigger_for_all_non_determined_applications = ARGV[3]&.strip == 'retrigger_for_all_non_determined_applications' |
11 | | -renewal_year = ARGV[4]&.to_i |
12 | | - |
13 | | -unless notice_type |
14 | | - puts "Must provide (oeg) notice type provided: #{ARGV[0]}" |
15 | | - exit 1 |
16 | | -end |
| 7 | +from_date = ARGV[0]&.to_date |
| 8 | +primary_person_hbx_ids_list = ARGV[1]&.split(",") || [] |
| 9 | +retrigger_for_all_non_determined_applications = ARGV[2]&.strip == 'retrigger_for_all_non_determined_applications' |
| 10 | +renewal_year = ARGV[3]&.to_i |
17 | 11 |
|
18 | 12 | unless from_date |
19 | | - puts "Must provide from_date in 'YYYY-MM-DD' or 'YYYY/MM/DD' format. Provided: #{ARGV[1]}" |
| 13 | + puts "Must provide from_date in 'YYYY-MM-DD' or 'YYYY/MM/DD' format. Provided: #{ARGV[0]}" |
20 | 14 | exit 1 |
21 | 15 | end |
22 | 16 |
|
23 | 17 | start_time = DateTime.current |
24 | | -puts "#{notice_type}_catch_up_notice_triggers start_time: #{start_time}" |
| 18 | +puts "oeg_catch_up_notice_triggers start_time: #{start_time}" |
25 | 19 |
|
26 | 20 | primary_person_hbx_ids = if retrigger_for_all_non_determined_applications |
27 | 21 | family_ids = if EnrollRegistry.feature_enabled?(:oeg_notice_income_verification_only) |
|
0 commit comments