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
e86f0a80
Unverified
Commit
e86f0a80
authored
Dec 13, 2017
by
Gregory Martin
Committed by
GitHub
Dec 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76 from edx/release_061217
Deployment Bugfix
parents
5b8943eb
b2b589aa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
24 deletions
+37
-24
VEDA_OS01/admin.py
+14
-0
VEDA_OS01/models.py
+2
-3
control/veda_file_discovery.py
+3
-1
static_config.yaml
+0
-9
youtube_callback/sftp_id_retrieve.py
+18
-11
No files found.
VEDA_OS01/admin.py
View file @
e86f0a80
...
...
@@ -151,6 +151,20 @@ class TranscriptProcessMetadataAdmin(admin.ModelAdmin):
"""
Admin for TranscriptProcessMetadata model.
"""
raw_id_fields
=
(
'video'
,
)
list_display
=
(
'get_video'
,
'provider'
,
'process_id'
,
'translation_id'
,
'lang_code'
,
'status'
)
def
get_video
(
self
,
obj
):
return
u'"{studio_id}" - "{edx_id}"'
.
format
(
studio_id
=
obj
.
video
.
studio_id
,
edx_id
=
obj
.
video
.
edx_id
)
get_video
.
admin_order_field
=
'video'
get_video
.
short_description
=
'Transcript Video'
search_fields
=
[
'video__edx_id'
,
'video__studio_id'
,
'process_id'
,
'translation_id'
]
model
=
TranscriptProcessMetadata
...
...
VEDA_OS01/models.py
View file @
e86f0a80
...
...
@@ -733,9 +733,8 @@ class TranscriptProcessMetadata(TimeStampedModel):
self
.
save
()
def
__unicode__
(
self
):
return
u'{video} - {provider} - {lang}
- {status}
'
.
format
(
return
u'{video} - {provider} - {lang}'
.
format
(
video
=
self
.
video
.
edx_id
,
provider
=
self
.
provider
,
lang
=
self
.
lang_code
,
status
=
self
.
status
,
lang
=
self
.
lang_code
)
control/veda_file_discovery.py
View file @
e86f0a80
...
...
@@ -186,6 +186,7 @@ class FileDiscovery(object):
institution
=
course_key
.
org
,
edx_classid
=
course_key
.
course
,
local_storedir
=
course_id
,
yt_proc
=
False
,
)
else
:
try
:
...
...
@@ -249,7 +250,8 @@ class FileDiscovery(object):
connection
=
boto
.
connect_s3
()
self
.
bucket
=
connection
.
get_bucket
(
self
.
auth_dict
[
'edx_s3_ingest_bucket'
])
for
video_s3_key
in
self
.
bucket
.
list
(
self
.
auth_dict
[
'edx_s3_ingest_prefix'
],
'/'
):
self
.
validate_metadata_and_feed_to_ingest
(
video_s3_key
=
self
.
bucket
.
get_key
(
video_s3_key
.
name
))
if
video_s3_key
.
name
!=
'prod-edx/unprocessed/'
:
self
.
validate_metadata_and_feed_to_ingest
(
video_s3_key
=
self
.
bucket
.
get_key
(
video_s3_key
.
name
))
except
S3ResponseError
:
ErrorObject
.
print_error
(
message
=
'[File Ingest] S3 Ingest Connection Failure'
)
except
NoAuthHandlerFound
:
...
...
static_config.yaml
View file @
e86f0a80
...
...
@@ -29,10 +29,8 @@ encode_dict:
mobile_override
:
-
override
s3_proc
:
-
mobile_high
-
mobile_low
-
audio_mp3
-
desktop_webm
-
desktop_mp4
-
hls
...
...
@@ -51,17 +49,10 @@ val_profile_dict:
override
:
-
desktop_mp4
-
mobile_low
-
mobile_high
mobile_high
:
-
mobile_high
audio_mp3
:
-
audio_mp3
desktop_webm
:
-
desktop_webm
youtube
:
-
youtube
review
:
...
...
youtube_callback/sftp_id_retrieve.py
View file @
e86f0a80
...
...
@@ -4,12 +4,14 @@ Check SFTP dropboxes for YT Video ID XML information
"""
import
datetime
import
fnmatch
import
logging
import
os
import
shutil
import
sys
import
xml.etree.ElementTree
as
ET
from
datetime
import
timedelta
from
os.path
import
expanduser
from
paramiko.ssh_exception
import
AuthenticationException
import
django
import
pysftp
...
...
@@ -28,6 +30,9 @@ if project_path not in sys.path:
os
.
environ
.
setdefault
(
'DJANGO_SETTINGS_MODULE'
,
'VEDA.settings.local'
)
django
.
setup
()
LOGGER
=
logging
.
getLogger
(
__name__
)
# TODO: Remove this temporary logging to stdout
logging
.
basicConfig
(
stream
=
sys
.
stdout
,
level
=
logging
.
INFO
)
"""
Defaults:
...
...
@@ -73,17 +78,19 @@ def xml_downloader(course):
cnopts
=
pysftp
.
CnOpts
()
cnopts
.
hostkeys
=
None
with
pysftp
.
Connection
(
'partnerupload.google.com'
,
username
=
course
.
yt_logon
,
private_key
=
private_key
,
port
=
19321
,
cnopts
=
cnopts
)
as
s1
:
s1
.
timeout
=
60.0
for
d
in
s1
.
listdir_attr
():
crawl_sftp
(
d
=
d
,
s1
=
s1
)
try
:
with
pysftp
.
Connection
(
'partnerupload.google.com'
,
username
=
course
.
yt_logon
,
private_key
=
private_key
,
port
=
19321
,
cnopts
=
cnopts
)
as
s1
:
s1
.
timeout
=
60.0
for
d
in
s1
.
listdir_attr
():
crawl_sftp
(
d
=
d
,
s1
=
s1
)
except
AuthenticationException
:
LOGGER
.
info
(
"{inst}{clss} : Authentication Failed"
.
format
(
inst
=
course
.
institution
,
clss
=
course
.
edx_classid
))
def
crawl_sftp
(
d
,
s1
):
...
...
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