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

Commit bdc457a

Browse files
author
Gregory Martin
committed
Change HEAL for legacy video encodes.
1 parent 2f0d8d4 commit bdc457a

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Diff for: control/veda_heal.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ def discovery(self):
5555
hours=HEAL_END
5656
)
5757
)
58-
58+
for v in self.video_query:
59+
LOGGER.info('[HEAL] {studio_id} | {video_id}: Determining Missing Encodes'.format(
60+
studio_id=v.studio_id,
61+
video_id=v.edx_id,
62+
))
5963
self.send_encodes()
6064

6165
def send_encodes(self):
66+
"""
67+
Unified function to enqueue videos with missing encodes
68+
69+
Ingest/HEAL both call this function
70+
"""
71+
# TODO: Refactor to common location
6272
for v in self.video_query:
6373
encode_list = self.determine_fault(video_object=v)
6474
# Using the 'Video Proto' Model

Diff for: control/veda_val.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ def profile_determiner(self, val_api_return):
237237
238238
"""
239239
# Defend against old/deprecated encodes
240-
try:
241-
self.auth_dict['val_profile_dict'][self.encode_profile]
242-
except KeyError:
243-
return
240+
if self.encode_profile:
241+
try:
242+
self.auth_dict['val_profile_dict'][self.encode_profile]
243+
except KeyError:
244+
return
244245
if self.endpoint_url:
245246
for p in self.auth_dict['val_profile_dict'][self.encode_profile]:
246247

@@ -270,7 +271,7 @@ def profile_determiner(self, val_api_return):
270271
try:
271272
self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]
272273
except KeyError:
273-
return
274+
continue
274275
for p in self.auth_dict['val_profile_dict'][final.encode_profile.product_spec]:
275276
test_list.append(dict(
276277
url=str(final.encode_url),

0 commit comments

Comments
 (0)