To test this, you will need a working OVS and open edx (tutur or devstack) instances locally. For OVS setup, follow README instruction, you may need to ask for AWS and CloudFront env variables from devops.
Or you can run docker-compose run web ./manage.py add_hls_video_to_edx --video-file-id <YOUR VIDEO FILE ID>
But I had no luck getting it posted to my tutor as I keep getting the following error, so maybe I am missing something.
HTTPConnectionPool(host='local.overhang.io', port=80): Max retries exceeded with url: /oauth2/access_token/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff7e982b50>: Failed to establish a new connection: [Errno 111] Connection refused'))
I was able to modify post_video_to_edx to test the code I added to make sure duration is returned correctly.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/3402
Description (What does it do?)
Adding functionality to populating duration when posting video to open edx. Duration can be found in EncodeJob json response (see https://video-rc.odl.mit.edu/admin/ui/video/165/change/)
How can this be tested?
To test this, you will need a working OVS and open edx (tutur or devstack) instances locally. For OVS setup, follow README instruction, you may need to ask for AWS and CloudFront env variables from devops.
In your local edx instance. e.g. tutor
Client id
andClient secret
In your OVS instance
Access Token
,Client id
andSecret Key
should match the ones you generated above in edx instanceEdx course id
with course-v1:edX+DemoX+Demo_Coursedocker-compose run web ./manage.py add_hls_video_to_edx --video-file-id <YOUR VIDEO FILE ID>
But I had no luck getting it posted to my tutor as I keep getting the following error, so maybe I am missing something.I was able to modify
post_video_to_edx
to test the code I added to make sure duration is returned correctly.