Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-pipeline
Commits
d7d046fd
Unverified
Commit
d7d046fd
authored
Dec 20, 2017
by
M. Rehan
Committed by
GitHub
Dec 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #79 from edx/mrehan/improve-logging
Improve logging and add an option to run 3play translations.
parents
e86f0a80
b7a9eaf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletions
+27
-1
VEDA_OS01/transcripts.py
+10
-0
bin/heal
+17
-1
No files found.
VEDA_OS01/transcripts.py
View file @
d7d046fd
...
...
@@ -962,6 +962,11 @@ def handle_video_translations(video, translations, file_id, api_key, log_prefix)
translation_state
=
translation_metadata
[
'state'
]
target_language
=
translation_metadata
[
'target_language_iso_639_1_code'
]
LOGGER
.
info
(
'[3PlayMedia Task] Translation metadata retrieved -- video=
%
s, translation_id=
%
s, language=
%
s, status=
%
s.'
,
video
.
studio_id
,
translation_id
,
target_language
,
translation_state
)
if
translation_state
==
COMPLETE
:
# Fetch the corresponding tracking process.
translation_process
=
get_in_progress_translation_process
(
...
...
@@ -1016,6 +1021,11 @@ def handle_video_translations(video, translations, file_id, api_key, log_prefix)
provider
=
TranscriptProvider
.
THREE_PLAY
,
)
LOGGER
.
info
(
'[3PlayMedia Task] Translation retrieval was successful -- video=
%
s, translation_id=
%
s, language=
%
s.'
,
video
.
studio_id
,
translation_id
,
target_language
)
# 5 - if all the processes for this video are complete, update transcript status
# for video in edx-val as well as edx-video-pipeline.
video_jobs
=
TranscriptProcessMetadata
.
objects
.
filter
(
video
=
video
)
...
...
bin/heal
View file @
d7d046fd
...
...
@@ -51,7 +51,8 @@ def main():
{cmd} -i veda_id
{cmd} -c course_id
{cmd} -s schedule
[-i -c -s]
{cmd} --process-translations
[-i -c -s --process-translations]
Use --help to see all options.
'''
.
format
(
cmd
=
sys
.
argv
[
0
])
...
...
@@ -71,12 +72,27 @@ def main():
action
=
'store_true'
)
parser
.
add_argument
(
'--process-translations'
,
dest
=
'process_translations'
,
help
=
'Retrieves completed 3PlayMedia translations for the videos.'
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
veda_id
=
args
.
veda_id
course_id
=
args
.
course_id
schedule
=
args
.
schedule
process_translations
=
args
.
process_translations
if
process_translations
:
# Only kick off a round of retrieving successful
# translations from 3Play Media
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
'VEDA.settings.production'
retrieve_three_play_translations
()
return
print
'
%
s -
%
s:
%
s'
%
(
'Healing'
,
'VEDA ID'
,
veda_id
)
print
'
%
s -
%
s:
%
s'
%
(
'Healing'
,
'Course'
,
course_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment