Skip to content

fix(metering): apply lock decorators outside sentry's cron wrapper - #13

Merged
StaberindeZA merged 1 commit into
mainfrom
fix-metrics-sweep-decorator-errors
Nov 23, 2026
Merged

StaberindeZA merged 1 commit into
mainfrom
fix-metrics-sweep-decorator-errors

Conversation

@StaberindeZA

@StaberindeZA StaberindeZA commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Because

  • Sentry v11 wraps @Cron handlers, which hides the lock decorators from LocksModule, so every sweep and metrics run on stage threw LocksModule doesn't know this instance

This pull request

  • Moves @Cron below @OnOneInstance and @WithoutOverlapping in both scheduler services
  • Runs the scheduler specs with @Cron wrapped the way Sentry does it; 30 of 38 failed before the fix with the stage error

Issue that this pull request solves

Closes: ENT-

Checklist

  • My commits are GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have manually reviewed all AI generated code.

Because:

- Sentry v11 wraps @Cron handlers, hiding the lock decorators from LocksModule, so every sweep and metrics run threw

This commit:

- Moves @Cron below @OnOneInstance and @WithoutOverlapping in both scheduler services, with specs that mimic Sentry's wrapping
@StaberindeZA
StaberindeZA force-pushed the fix-metrics-sweep-decorator-errors branch from 0d47f06 to 3599e15 Compare November 23, 2026 23:39
@StaberindeZA
StaberindeZA marked this pull request as ready for review November 23, 2026 23:45
@StaberindeZA
StaberindeZA merged commit f3b940c into main Nov 23, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants