Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

check_api Checks Same Week/Date Range Twice #46

@ThorntonMatthewD

Description

@ThorntonMatthewD

Screenshot_2023-10-24_00-33-49

slack-events-bot/src/bot.py

Lines 131 to 136 in f8b800e

# keep current week's post up to date
await parse_events_for_week(today, resp)
# potentially post next week 5 days early
probe_date = today + datetime.timedelta(days=5)
await parse_events_for_week(probe_date, resp)

At certain points during the week the above code will cause parse_events_for_week to be called with probe_date values that end up causing the same week to have messages posted/updated for it twice.

I think it would be good to check for the overlap or some other condition before firing off the second, lookahead function execution on L136.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions