Skip to content

Chore(subscription-termination): change termination behaviour to hourly - #6004

Open
annvelents wants to merge 3 commits into
mainfrom
chore/terminate-subscriptions-after-ending-at
Open

Chore(subscription-termination): change termination behaviour to hourly#6004
annvelents wants to merge 3 commits into
mainfrom
chore/terminate-subscriptions-after-ending-at

Conversation

@annvelents

@annvelents annvelents commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Context

Before we were comparing date of ending_at to date of today, resulting in subscirptions terminating sometimes long before their actual termination date

Now we'll be terminating each hour subscriptions that ended during this hour

Description

Changed TerminateEndedSubscriptionsJob to check which subscriptions need to be terminated by checking which of them are in the past

Edge cases:

  1. Billing is at 00:10
    termination is at 23:59
    after billing, before subscription there is usage
    make sure no usage is lost

  2. billing is at 00:10
    termination is at 00:10
    make sure there are no double-billing

  3. Termination is at 00:01
    Billing is at 00:10
    no double invoices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant