Skip to content

Fix(state management): store state in global variable to allow the sc…#811

Merged
armanddidierjean merged 2 commits intomainfrom
state-global
Sep 3, 2025
Merged

Fix(state management): store state in global variable to allow the sc…#811
armanddidierjean merged 2 commits intomainfrom
state-global

Conversation

@armanddidierjean
Copy link
Member

@armanddidierjean armanddidierjean commented Aug 30, 2025

…heduler to access db (backport of ProximApp#8)

  • Fix user batch invitation response model

  • Fix: add missing param in send_emails_from_queue_task

  • Get db directly using SessionLocal

  • Store state in global Python variable

  • Use arq 0.26.3

  • Don't keep arq job results after completion

to be able to queue new jobs with the same id

  • Cancel planned notification with the same job_id

before queuing a new one

  • fixup state

  • Access GLOBAL_STATE in tests init

  • Remove unexpected state param while disconnecting

  • Lint

  • Parametrize test_factory fixture

  • Lint

  • Refactor test settings

@codecov
Copy link

codecov bot commented Aug 30, 2025

Codecov Report

❌ Patch coverage is 81.63265% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.79%. Comparing base (25f3217) to head (5867cfe).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/types/scheduler.py 12.50% 7 Missing ⚠️
app/dependencies.py 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #811      +/-   ##
==========================================
- Coverage   85.80%   85.79%   -0.01%     
==========================================
  Files         179      179              
  Lines       12236    12244       +8     
==========================================
+ Hits        10499    10505       +6     
- Misses       1737     1739       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@armanddidierjean armanddidierjean force-pushed the state-global branch 2 times, most recently from 58d7c5f to df9f75d Compare September 2, 2025 22:24
…heduler to access db (#8)

* Fix user batch invitation response model

* Fix: add missing param in send_emails_from_queue_task

* Get db directly using SessionLocal

* Store state in global Python variable

* Use arq 0.26.3

* Don't keep arq job results after completion

to be able to queue new jobs with the same id

* Cancel planned notification with the same job_id

before queuing a new one

* fixup state

* Access GLOBAL_STATE in tests init

* Remove unexpected state param while disconnecting

* Lint

* Parametrize test_factory fixture

* Lint

* Refactor test settings

* Lint
# Conflicts:
#	app/core/users/endpoints_users.py
#	app/types/scheduler.py
#	tests/test_myeclpay.py
#	tests/test_payment.py
@armanddidierjean armanddidierjean merged commit b16033f into main Sep 3, 2025
8 checks passed
@armanddidierjean armanddidierjean deleted the state-global branch September 3, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants