Skip to content

shared-opt-dir/agency-parser/archive.sh doesn't remove old schedule entirely in the past when current one available #534

Closed

Description

@mmathieum

Because it iterates over archives by [A-Z0-9] order, old archive are checked 1st so they are kept even if newer one is available.

Example:

Archives:

  • archive/20250903-20251212.zip
  • archive/20251118-20260327.zip

Result:

> Yesterday: '20260128'
- archive dir: './archive'
--------------------
- archive: ./archive/20250903-20251212.zip
- archive start date: '20250903'
- archive end date: '20251212'
- archive is entirely in the past & older than previous one > KEEP as CURRENT
--------------------
--------------------
- archive: ./archive/20251118-20260327.zip
- archive start date: '20251118'
- archive end date: '20260327'
- archive starts before 20260128 and ends after > KEEP as CURRENT
--------------------

Expected:

> Yesterday: '20260128'
- archive dir: './archive'
--------------------
- archive: ./archive/20251118-20260327.zip
- archive start date: '20251118'
- archive end date: '20260327'
- archive starts before 20260128 and ends after > KEEP as CURRENT
--------------------
--------------------
- archive: ./archive/20250903-20251212.zip
- archive start date: '20250903'
- archive end date: '20251212'
- archive is entirely in the past & older than new one > REMOVE
--------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

AIshell

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions