|
1 | 1 | # Generated by Django 4.2.9 on 2024-12-06 03:51
|
2 |
| - |
3 | 2 | from django.conf import settings
|
4 | 3 | from django.db import migrations, models
|
5 | 4 | import django.db.models.deletion
|
|
8 | 7 | def set_initial_reindexing_status(apps, schema_editor):
|
9 | 8 | Collection = apps.get_model("sde_collections", "Collection")
|
10 | 9 |
|
11 |
| - # List of collections that have been reindexed on LRM dev |
12 |
| - reindexed_collections = { |
13 |
| - "astrophysics_source_code_library", |
14 |
| - "astrophysics_science_division_asd_code_660", |
15 |
| - "the_astrophysics_astrochemistry_lab", |
16 |
| - "Space_Physics_Data_Facility", |
17 |
| - "ppi_node", |
18 |
| - "sun_climate_powered_by_solar_irradiance", |
19 |
| - "magnetospheric_multiscale_satellites", |
20 |
| - "mdscc_deep_space_network", |
21 |
| - "voyager", |
22 |
| - "f_prime", |
23 |
| - "interactive_multiinstrument_database_of_solar_flares", |
24 |
| - "cii_hosted_payload_opportunity_online_database", |
25 |
| - "national_space_weather_program", |
26 |
| - "starchild_a_learning_center_for_young_astronomers", |
27 |
| - "nexsci", |
28 |
| - "explorer_1", |
29 |
| - "the_new_great_observatories", |
30 |
| - "nasa_ames_intelligent_systems_division_data", |
31 |
| - "tropical_cyclone_information_system_data_repository", |
32 |
| - "explorers_and_heliophysics_projects_division", |
33 |
| - } |
34 |
| - |
35 | 10 | # Define the workflow status values
|
36 | 11 | RESEARCH_IN_PROGRESS = 1
|
37 | 12 | READY_FOR_ENGINEERING = 2
|
@@ -68,22 +43,13 @@ def set_initial_reindexing_status(apps, schema_editor):
|
68 | 43 | NEEDS_DELETE,
|
69 | 44 | ]
|
70 | 45 |
|
71 |
| - # Set collections that have been reindexed |
72 |
| - Collection.objects.filter(config_folder__in=reindexed_collections).update(reindexing_status=3) # FINISHED |
73 |
| - |
74 | 46 | # Set collections that don't need reindexing
|
75 |
| - Collection.objects.filter(workflow_status__in=reindexing_not_needed_statuses).exclude( |
76 |
| - config_folder__in=reindexed_collections |
77 |
| - ).update( |
| 47 | + Collection.objects.filter(workflow_status__in=reindexing_not_needed_statuses).update( |
78 | 48 | reindexing_status=1
|
79 | 49 | ) # NOT_NEEDED
|
80 | 50 |
|
81 | 51 | # All other collections need reindexing
|
82 |
| - Collection.objects.exclude(config_folder__in=reindexed_collections).exclude( |
83 |
| - workflow_status__in=reindexing_not_needed_statuses |
84 |
| - ).update( |
85 |
| - reindexing_status=2 |
86 |
| - ) # NEEDED |
| 52 | + Collection.objects.exclude(workflow_status__in=reindexing_not_needed_statuses).update(reindexing_status=2) # NEEDED |
87 | 53 |
|
88 | 54 |
|
89 | 55 | class Migration(migrations.Migration):
|
|
0 commit comments