Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flask, next] Add Celery Queue for subscribe send email workflow #666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lukemun
Copy link
Contributor

@lukemun lukemun commented Jan 22, 2025

Changes

  • Setups a celery queue backed by redis
  • Updates the subscribe feature in nextjs to do the following depending on error_boundary=true/false
    • Send a enqueue request to flask
    • Showcase error boundary
  • Adds enqueue endpoint
  • Update run.sh to start celery with the flask server

Testing

  • Start flask server and next server (./deploy.sh --env=local ...)
  • Got to home page
  • Subscribe at footer, an event check queue endpoint is called and task run
  • set error_boundary=true, check existing functionality runs

@lukemun lukemun requested a review from a team as a code owner January 22, 2025 15:42
Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
empower ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 4:20pm

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 32.74%. Comparing base (76731e7) to head (f958ad3).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
flask/src/queues/celery.py 0.00% 17 Missing ⚠️
flask/src/queues/tasks.py 0.00% 12 Missing ⚠️
flask/src/main.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #666      +/-   ##
==========================================
- Coverage   34.13%   32.74%   -1.39%     
==========================================
  Files          37       39       +2     
  Lines         920      959      +39     
  Branches      111      111              
==========================================
  Hits          314      314              
- Misses        589      628      +39     
  Partials       17       17              
Flag Coverage Δ
api 6.00% <0.00%> (-0.60%) ⬇️
frontend 54.75% <ø> (ø)
Components Coverage Δ
checkout_module 6.00% <0.00%> (-0.60%) ⬇️
product_component 56.41% <ø> (ø)
Files with missing lines Coverage Δ
flask/src/main.py 0.00% <0.00%> (ø)
flask/src/queues/tasks.py 0.00% <0.00%> (ø)
flask/src/queues/celery.py 0.00% <0.00%> (ø)

Copy link

codecov bot commented Jan 22, 2025

Bundle Report

Bundle size has no change ✅

@lukemun lukemun requested a review from realkosty January 22, 2025 15:48
@lukemun lukemun changed the title Add Celery Queue for subscribe send email workflow [flask, next] Add Celery Queue for subscribe send email workflow Jan 22, 2025
@lukemun lukemun force-pushed the queues branch 2 times, most recently from 0d3e2fa to ec48d08 Compare January 22, 2025 19:03
- Setups a celery queue backed by redis
- Updates the subscribe feature in nextjs to do the following depending on error_boundary=true/false
-- Send a enqueue request to flask
-- Showcase error boundary
- Adds enqueue endpoint
- Update run.sh to start celery with the flask server
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