Unverified Commit 3d7d099e by Gregory Martin Committed by GitHub

Merge pull request #101 from edx/yro/EDUCATOR-2786

Change HEAL for legacy video encodes.
parents 2f0d8d4b bdc457a4
...@@ -55,10 +55,20 @@ class VedaHeal(object): ...@@ -55,10 +55,20 @@ class VedaHeal(object):
hours=HEAL_END hours=HEAL_END
) )
) )
for v in self.video_query:
LOGGER.info('[HEAL] {studio_id} | {video_id}: Determining Missing Encodes'.format(
studio_id=v.studio_id,
video_id=v.edx_id,
))
self.send_encodes() self.send_encodes()
def send_encodes(self): def send_encodes(self):
"""
Unified function to enqueue videos with missing encodes
Ingest/HEAL both call this function
"""
# TODO: Refactor to common location
for v in self.video_query: for v in self.video_query:
encode_list = self.determine_fault(video_object=v) encode_list = self.determine_fault(video_object=v)
# Using the 'Video Proto' Model # Using the 'Video Proto' Model
......
...@@ -237,10 +237,11 @@ class VALAPICall(object): ...@@ -237,10 +237,11 @@ class VALAPICall(object):
""" """
# Defend against old/deprecated encodes # Defend against old/deprecated encodes
try: if self.encode_profile:
self.auth_dict['val_profile_dict'][self.encode_profile] try:
except KeyError: self.auth_dict['val_profile_dict'][self.encode_profile]
return except KeyError:
return
if self.endpoint_url: if self.endpoint_url:
for p in self.auth_dict['val_profile_dict'][self.encode_profile]: for p in self.auth_dict['val_profile_dict'][self.encode_profile]:
...@@ -270,7 +271,7 @@ class VALAPICall(object): ...@@ -270,7 +271,7 @@ class VALAPICall(object):
try: try:
self.auth_dict['val_profile_dict'][final.encode_profile.product_spec] self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]
except KeyError: except KeyError:
return continue
for p in self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]: for p in self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]:
test_list.append(dict( test_list.append(dict(
url=str(final.encode_url), url=str(final.encode_url),
......
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