From eeb6547730df89d498d14b6d77d0a4e8b3c7cf56 Mon Sep 17 00:00:00 2001 From: Josh Garde Date: Mon, 23 Oct 2023 09:51:51 -0700 Subject: [PATCH] Hotfix for Tile Table (#11) * Hotfixes for tile table * Linting --- podaac/swodlr_ingest_to_sds/poll_status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podaac/swodlr_ingest_to_sds/poll_status.py b/podaac/swodlr_ingest_to_sds/poll_status.py index 0c4970a..8aa35c3 100644 --- a/podaac/swodlr_ingest_to_sds/poll_status.py +++ b/podaac/swodlr_ingest_to_sds/poll_status.py @@ -11,7 +11,7 @@ SUCCESS_STATUSES = {'job-completed'} FAIL_STATUSES = {'job-failed', 'job-offline', 'job-deduped'} PRODUCT_REGEX = re.compile( - r'_(?PPIXC(Vec)?)_(?P\d{3})_(?P\d{3})_(?P\d{3}(R|L))_' # noqa: E501 + r'_(?PPIXC(Vec)?)_(?P\d{3})_(?P\d{3})_(?P\d{3})(?P(R|L))_' # pylint: disable=line-too-long # noqa: E501 ) @@ -75,7 +75,7 @@ def lambda_handler(event, _context): if cpt is not None: tile_id = f'{cpt["product"]},{cpt["cycle"]},{cpt["pass"]},{cpt["tile"]}' # pylint: disable=line-too-long # noqa: E501 available_tiles_table.put_item( - Item={'tile_id': tile_id} + Item={'tile_id': {'S': tile_id}} ) new_event['jobs'].remove(item) # Remove from queue @@ -95,5 +95,5 @@ def _extract_cpt(granule_id): 'product': parsed_id.group('product'), 'cycle': int(parsed_id.group('cycle')), 'pass': int(parsed_id.group('pass')), - 'tile': int(parsed_id.group('tile')) + 'tile': int(parsed_id.group('tile')) + parsed_id.group('direction') }