Commit d28bd1bc by Gregory Martin Committed by GitHub

Merge pull request #13 from edx/yro/update_val_ingest_call

Update URL handling
parents d682334e 1af95727
......@@ -386,20 +386,10 @@ class VedaIngest:
else:
val_status = 'ingest'
val_duration = Output._seconds_from_string(duration=self.video_proto.duration)
if self.video_proto.s3_filename is not None:
val_id = self.video_proto.s3_filename
else:
val_id = self.video_proto.veda_id
if self.video_proto.platform_course_url is None:
self.video_proto.platform_course_url = ''
VAC = VALAPICall(
video_proto=self.video_proto,
val_status=val_status,
platform_course_url=self.video_proto.platform_course_url
platform_course_url="" # Empty record for initial status update
)
VAC.call()
......
......@@ -81,10 +81,8 @@ class VALAPICall():
if self.val_token is None:
self.val_tokengen()
if self.video_object is not None:
print 'VIDEO OBJECT'
self.send_object_data()
if self.video_proto is not None:
print 'VIDEO PROTO'
self.send_val_data()
def _AUTH(self):
......@@ -106,7 +104,9 @@ class VALAPICall():
@newrelic.agent.background_task()
def val_tokengen(self):
"""
Generate a API token for VAL
"""
payload = {
'grant_type': 'password',
'client_id': self.auth_dict['val_client_id'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment