This repository was archived by the owner on Oct 1, 2020. It is now read-only.
File tree 2 files changed +17
-6
lines changed
2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,20 @@ def discovery(self):
55
55
hours = HEAL_END
56
56
)
57
57
)
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
+ ))
59
63
self .send_encodes ()
60
64
61
65
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
62
72
for v in self .video_query :
63
73
encode_list = self .determine_fault (video_object = v )
64
74
# Using the 'Video Proto' Model
Original file line number Diff line number Diff line change @@ -237,10 +237,11 @@ def profile_determiner(self, val_api_return):
237
237
238
238
"""
239
239
# 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
244
245
if self .endpoint_url :
245
246
for p in self .auth_dict ['val_profile_dict' ][self .encode_profile ]:
246
247
@@ -270,7 +271,7 @@ def profile_determiner(self, val_api_return):
270
271
try :
271
272
self .auth_dict ['val_profile_dict' ][final .encode_profile .product_spec ]
272
273
except KeyError :
273
- return
274
+ continue
274
275
for p in self .auth_dict ['val_profile_dict' ][final .encode_profile .product_spec ]:
275
276
test_list .append (dict (
276
277
url = str (final .encode_url ),
You can’t perform that action at this time.
0 commit comments