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

Configure Celery for Certain progress routes #120

Open
bryanwong8 opened this issue Apr 19, 2020 · 0 comments
Open

Configure Celery for Certain progress routes #120

bryanwong8 opened this issue Apr 19, 2020 · 0 comments
Assignees

Comments

@bryanwong8
Copy link
Contributor

bryanwong8 commented Apr 19, 2020

Is your feature request related to a problem? Please describe.
Some progress routes take a while to process, but the user does not need to wait for the response.

Describe the solution you'd like
Make the heavy task async since that would make the User experience a lot better since they don't have to wait for a process finish. Reduce the amount of times the user has to look at a loading screen. We can use celery to make the tasks async.

References

  • Use celery to make the tasks async. https://flask.palletsprojects.com/en/1.1.x/patterns/celery/
  • Before updating the routes, you need to configure the init.py file in the backend folder
  • Routes to change:
    • UnlockHint /activities/<int:activity_id>/hints/<int:hint_id> PUT
    • DeleteActivityProgress /activities/<int:activity_id>/progress DEL
    • JoinClassroom /students/classrooms PUT
    • GradeSubmission /teachers/<int:activity_id>/grade PUT
    • CreateClassroom /classrooms POST
    • UpdateClassroom /classrooms/<int:classroom_id> PUT
    • DeleteClassroom /classrooms/<int:classroom_id> DEL
    • UpdateClassroomModules /classrooms/<int:classroom_id>/modules PUT
      Make sure to test the routes with Postman with the collection: https://documenter.getpostman.com/view/4691925/SzS8uRkd?version=latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants