Skip to content

Commit 9acfb14

Browse files
committed
remove assignment of reindexing finished status in migration file
1 parent 60b9afd commit 9acfb14

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

sde_collections/migrations/0072_collection_reindexing_status_reindexinghistory.py

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Generated by Django 4.2.9 on 2024-12-06 03:51
2-
32
from django.conf import settings
43
from django.db import migrations, models
54
import django.db.models.deletion
@@ -8,30 +7,6 @@
87
def set_initial_reindexing_status(apps, schema_editor):
98
Collection = apps.get_model("sde_collections", "Collection")
109

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-
3510
# Define the workflow status values
3611
RESEARCH_IN_PROGRESS = 1
3712
READY_FOR_ENGINEERING = 2
@@ -68,22 +43,13 @@ def set_initial_reindexing_status(apps, schema_editor):
6843
NEEDS_DELETE,
6944
]
7045

71-
# Set collections that have been reindexed
72-
Collection.objects.filter(config_folder__in=reindexed_collections).update(reindexing_status=3) # FINISHED
73-
7446
# 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(
7848
reindexing_status=1
7949
) # NOT_NEEDED
8050

8151
# 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
8753

8854

8955
class Migration(migrations.Migration):

0 commit comments

Comments
 (0)