Skip to content
Snippets Groups Projects
Commit c13bd6cc authored by Hannes Feldt's avatar Hannes Feldt
Browse files

Merge branch 'L2SS-1914-fix_s3_packet_loader' into 'main'

L2SS-1914: Fix S3 packet loader

Closes L2SS-1914

See merge request !26
parents 2442e760 5141f5a3
No related branches found
Tags v0.0.23
1 merge request!26L2SS-1914: Fix S3 packet loader
Pipeline #108394 failed
Pipeline: Stingray

#108395

    # Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
    # Copyright (C) 2025 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """
    ......@@ -8,12 +8,12 @@ of n minutes and storing them on a S3 backend
    import json
    import logging
    from datetime import datetime, timedelta
    import time
    from datetime import datetime, timedelta, timezone
    from typing import Generator
    from minio import Minio
    import minio.datatypes
    from minio import Minio
    logger = logging.getLogger()
    ......@@ -120,6 +120,10 @@ class S3PacketLoader: # pylint: disable=too-few-public-methods
    continue
    packet = json.loads(line)
    packet_ts = datetime.fromisoformat(packet[ts_field])
    packet_ts = packet_ts.replace(
    tzinfo=packet_ts.tzinfo or timezone.utc
    ).astimezone(timezone.utc)
    if packet_ts < start:
    continue
    if packet_ts > end:
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment