Open
Conversation
eea2b5a to
28c654a
Compare
210250e to
bf9b6fe
Compare
kodek-sleuth
suggested changes
Nov 1, 2019
bf9b6fe to
411dafb
Compare
4eb1f0b to
fdc6d01
Compare
kodek-sleuth
approved these changes
Nov 5, 2019
Emile-Nsengimana
approved these changes
Nov 5, 2019
joshuaocero
suggested changes
Nov 7, 2019
Contributor
joshuaocero
left a comment
There was a problem hiding this comment.
@manzif This seems to work as expected however I just have an issue with the way your celery tasks are structured. You have turned the whole send_notification function into a celery task which is wrong for a number of reasons;
- The send_notification function returns a response and having it executed by a celery worker meaning the return will never be used thus making it garbage.
- The user will no longer receive a JSON response to upon hitting the endpoint.
- The user will not get feedback on errors because the entire function has been delayed.
I would recommend delaying only the calls to external APIs and keeping the rest of the code the way it is.
b13ba4e to
158d136
Compare
Contributor
|
@manzif please move the celery tasks to another file. That should be the only change otherwise it looks good. |
317cdac to
221dd0e
Compare
- hange these receive calls to be asynchronous and handled by celery [Delivers CV3-55]
221dd0e to
53b9ca5
Compare
joshuaocero
approved these changes
Nov 18, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request makes notifications calls run on celery.
How can This be tested
git clone https://github.com/andela/mrm_push.gitReadme.mdstory/CV3-55-celery-notification-callscelery worker -A cworker.celery --loglevel=infohttp://127.0.0.1:5000/notificationsType of change
Please select the relevant option
Checklist:
JIRA
CV3-55