-
Notifications
You must be signed in to change notification settings - Fork 6
Description
The Track Ingest operations help to reconcile any granules that might have error-ed out or somehow been missed when the SWOT shapefiles are ingested in the Hydrocron database. Currently the Track Ingest operations search for any newer granules by the product counter to ensure older granules due not overwrite newer ones. This process does not remove the older granules "to_ingest" status during this search process so that these older granules get stuck as requiring ingest in the database but never actually ingested.
The track ingest code should be modified to remove the "to_ingest" status when a newer granules is detected. See these code lines:
hydrocron/hydrocron/db/track_ingest.py
Lines 311 to 338 in b58dfc7
| def _query_product_counter(self, hydrocron_table, granule_ur): | |
| """Determine if reprocessing CRID exists and prioritize. | |
| If a higher product counter exists, that item is returned indicating the | |
| older product counter should not be ingested. Otherwise an empty | |
| list is returned indicating no higher product counters exist. | |
| :param hydrocron_table: Name of hydrocron table to query | |
| :type hydrocron_table: str | |
| :param granule_ur: Granule UR | |
| :type granule_ur: string | |
| :rtype: list | |
| """ | |
| product_counter = granule_ur.split("_")[-1].split(".")[0] | |
| padding = ['0'] * (len(product_counter) - 1) | |
| items = { | |
| "Items": [] | |
| } | |
| for counter in range(int(product_counter), self.COUNTER_RANGE + 1): | |
| incremented_counter = f"{''.join(padding)}{str(int(counter) + 1)}" | |
| incremented_granule = granule_ur.replace(f"{product_counter}.zip", f"{incremented_counter}.zip") | |
| items = self.data_repository.get_granule_ur(hydrocron_table, incremented_granule) | |
| if len(items["Items"]) > 0: | |
| logging.info("Located incremented product counter: %s.", incremented_granule) | |
| break | |
| return items |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status