Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #101 from edx/yro/EDUCATOR-2786
Browse files Browse the repository at this point in the history
Change HEAL for legacy video encodes.
  • Loading branch information
yro authored May 3, 2018
2 parents 2f0d8d4 + bdc457a commit 3d7d099
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 11 additions & 1 deletion control/veda_heal.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ def discovery(self):
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()

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:
encode_list = self.determine_fault(video_object=v)
# Using the 'Video Proto' Model
Expand Down
11 changes: 6 additions & 5 deletions control/veda_val.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,11 @@ def profile_determiner(self, val_api_return):
"""
# Defend against old/deprecated encodes
try:
self.auth_dict['val_profile_dict'][self.encode_profile]
except KeyError:
return
if self.encode_profile:
try:
self.auth_dict['val_profile_dict'][self.encode_profile]
except KeyError:
return
if self.endpoint_url:
for p in self.auth_dict['val_profile_dict'][self.encode_profile]:

Expand Down Expand Up @@ -270,7 +271,7 @@ def profile_determiner(self, val_api_return):
try:
self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]
except KeyError:
return
continue
for p in self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]:
test_list.append(dict(
url=str(final.encode_url),
Expand Down

0 comments on commit 3d7d099

Please sign in to comment.