mitodl / odl-video-service

building blocks for a basic video service for ODL
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

call the celery task as async #1030

Closed collinpreston closed 1 year ago

collinpreston commented 1 year ago

Pre-Flight checklist

What are the relevant tickets?

https://github.com/mitodl/odl-video-service/issues/1027

What's this PR do?

This PR changes the chain of celery tasks, that are called when adding videos, to be asynchronous. It also removes any dependency on those tasks in the returned response in order to (hopefully) speed up the response from the upload endpoint.

How should this be manually tested?

  1. Have OVS running locally.
  2. Have a large number of videos and an empty collection created in OVS.
  3. In one operation, select all of your videos from dropbox and add them to your collection.
  4. Verify that all of the videos are added to the collection and encoded properly.

Any background context you want to provide?

I was not able to reproduce the error from the issue when testing locally. Using the same files I use locally, I can reproduce the error consistently in RC. I would expect that testing this PR locally should be limited to just ensuring that nothing is broken. Testing to see whether this change resolves the issue seen in RC and Production will need to wait until this is deployed to those environments.

codecov-commenter commented 1 year ago

Codecov Report

Merging #1030 (65e22e9) into master (9b0292d) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1030   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files         182      182           
  Lines        7356     7356           
  Branches      254      254           
=======================================
  Hits         7061     7061           
  Misses        261      261           
  Partials       34       34           
Impacted Files Coverage Δ
ui/api.py 91.66% <100.00%> (ø)
ui/signals.py 98.07% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.