Skip to content

Send notification content through Firebase and add an Arq scheduler#613

Merged
armanddidierjean merged 113 commits intomainfrom
Notification-final-branch
Jan 2, 2025
Merged

Send notification content through Firebase and add an Arq scheduler#613
armanddidierjean merged 113 commits intomainfrom
Notification-final-branch

Conversation

@foucblg
Copy link
Copy Markdown
Contributor

@foucblg foucblg commented Oct 29, 2024

No description provided.

@foucblg foucblg force-pushed the Notification-final-branch branch 3 times, most recently from e9e646b to 07a5ce5 Compare November 17, 2024 04:49
@armanddidierjean armanddidierjean marked this pull request as draft November 17, 2024 08:06
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 53.26087% with 86 lines in your changes missing coverage. Please review.

Project coverage is 80.99%. Comparing base (66e7531) to head (a0ce052).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/types/scheduler.py 45.94% 40 Missing ⚠️
app/utils/communication/notifications.py 55.81% 19 Missing ⚠️
app/core/notification/endpoints_notification.py 56.25% 7 Missing ⚠️
app/app.py 14.28% 6 Missing ⚠️
app/modules/ph/endpoints_ph.py 16.66% 5 Missing ⚠️
app/dependencies.py 57.14% 3 Missing ⚠️
app/utils/tools.py 57.14% 3 Missing ⚠️
app/modules/cinema/endpoints_cinema.py 50.00% 1 Missing ⚠️
app/modules/loan/endpoints_loan.py 91.66% 1 Missing ⚠️
app/types/exceptions.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #613      +/-   ##
==========================================
- Coverage   81.31%   80.99%   -0.33%     
==========================================
  Files         129      130       +1     
  Lines       10013    10116     +103     
==========================================
+ Hits         8142     8193      +51     
- Misses       1871     1923      +52     

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

@foucblg foucblg added the ready for review This PR is ready to be reviewed label Nov 20, 2024
@foucblg foucblg marked this pull request as ready for review November 25, 2024 12:30
armanddidierjean

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@armanddidierjean armanddidierjean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a test that tries to defer a method using the scheduler

)
scheduler_logger.debug(f"Job {job_id} queued {job}")

async def queue_job_defer_to(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a real interest in keeping both queue_job_time_defer and queue_job_defer_to?
I think we are likely to calculate defer_seconds using a timedelta and datetime, and thus could easily use queue_job_defer_to instead.

It seems Arq will calculate a datetime in both cases, so there shouldn't be a performance gain from using a method or the other.

I would think only having one method will reduce code complexity and limit potentials mistakes

@armanddidierjean armanddidierjean changed the title Notification final branch Send notification content through Firebase and add an Arq scheduler Dec 3, 2024
@Daihecyy Daihecyy added wontfix This will not be worked on and removed wontfix This will not be worked on labels Dec 3, 2024
@Rotheem Rotheem force-pushed the Notification-final-branch branch 3 times, most recently from 4cadc2f to 0eb2466 Compare December 4, 2024 19:09
@Marc-Andrieu Marc-Andrieu mentioned this pull request Dec 25, 2024
4 tasks
Copy link
Copy Markdown
Member

@armanddidierjean armanddidierjean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will improve the remaining points in the future
#647

@armanddidierjean armanddidierjean force-pushed the Notification-final-branch branch from a0ce052 to 6b40657 Compare January 2, 2025 19:36
@armanddidierjean armanddidierjean merged commit 82febab into main Jan 2, 2025
@armanddidierjean armanddidierjean deleted the Notification-final-branch branch January 2, 2025 19:44
foucblg pushed a commit that referenced this pull request Jan 6, 2025
> [!IMPORTANT]
> We really need to release new versions **soon**, as we have not for
several months and there's some time needed to test in alpha before
prod.

This goes hand in hand with the **major version bump** [for
Titan](../../Titan/pull/462).

Both PRs are ready, and _seemingly_ waiting for some more **breaking
changes** to be merged, including (by likelihood):

- [ ] Allow students from other Schools to have a MyECL account: #641 
- [ ] MyECLPay: #611 
- [ ] "_Centrale Mega Meme_" Meme module: [no PR yet] [see
branch](../tree/cmm)
- [x] External Notifications: #613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request notifications ready for review This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants