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
71e238b5
Commit
71e238b5
authored
Nov 15, 2017
by
Gregory Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine HEAL process, make logging louder
parent
89d4920e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
8 deletions
+23
-8
bin/deliver
+1
-1
bin/heal
+1
-1
control/veda_deliver.py
+5
-0
control/veda_heal.py
+11
-2
instance_config.yaml
+1
-1
static_config.yaml
+4
-3
No files found.
bin/deliver
View file @
71e238b5
...
...
@@ -61,7 +61,7 @@ class DeliverCli:
'worker'
,
'--loglevel=info'
,
'--concurrency='
+
str
(
auth_dict
[
'celery_threads'
]),
'-Q '
+
auth_dict
[
'celery_deliver_queue'
],
'-Q '
+
auth_dict
[
'celery_deliver_queue'
]
+
','
+
auth_dict
[
'celery_heal_queue'
]
,
'-n deliver.
%
h'
))
)
...
...
bin/heal
View file @
71e238b5
...
...
@@ -34,7 +34,7 @@ class HealCli:
.
replace
(
hour
=
0
,
minute
=
0
,
second
=
0
,
microsecond
=
0
)
\
.
astimezone
(
pytz
.
utc
)
+
timedelta
(
days
=
1
)
maintainer_healer
.
apply_async
((
self
.
binscript
,),
queue
=
'transcode_stat'
,
eta
=
go_time
)
maintainer_healer
.
apply_async
((
self
.
binscript
,),
queue
=
auth_dict
[
'celery_heal_queue'
]
,
eta
=
go_time
)
def
main
():
...
...
control/veda_deliver.py
View file @
71e238b5
...
...
@@ -8,6 +8,7 @@ import datetime
import
logging
import
shutil
from
os.path
import
expanduser
import
sys
import
boto
import
boto.s3
...
...
@@ -35,6 +36,9 @@ except ImportError:
from
veda_deliver_3play
import
ThreePlayMediaClient
LOGGER
=
logging
.
getLogger
(
__name__
)
# TODO: Remove this temporary logging to stdout
logging
.
basicConfig
(
stream
=
sys
.
stdout
,
level
=
logging
.
INFO
)
try
:
boto
.
config
.
add_section
(
'Boto'
)
except
:
...
...
@@ -66,6 +70,7 @@ class VedaDelivery:
Check the destination, route via available methods,
throw error if method is not extant
"""
LOGGER
.
info
(
'[VIDEO_DELIVER] {video_id} : {encode}'
.
format
(
video_id
=
self
.
veda_id
,
encode
=
self
.
encode_profile
))
if
self
.
encode_profile
==
'hls'
:
# HLS encodes are a pass through
self
.
hls_run
()
...
...
control/veda_heal.py
View file @
71e238b5
...
...
@@ -9,6 +9,7 @@ Roll through videos, check for completion
"""
import
datetime
from
datetime
import
timedelta
import
logging
import
os
import
sys
import
uuid
...
...
@@ -27,6 +28,10 @@ from VEDA.utils import get_config
time_safetygap
=
datetime
.
datetime
.
utcnow
()
.
replace
(
tzinfo
=
utc
)
-
timedelta
(
days
=
1
)
LOGGER
=
logging
.
getLogger
(
__name__
)
# TODO: Remove this temporary logging to stdout
logging
.
basicConfig
(
stream
=
sys
.
stdout
,
level
=
logging
.
INFO
)
class
VedaHeal
(
object
):
"""
...
...
@@ -87,6 +92,7 @@ class VedaHeal(object):
"""
Determine expected and completed encodes
"""
LOGGER
.
info
(
'[HEAL] : {id}'
.
format
(
id
=
video_object
.
edx_id
))
if
self
.
freezing_bug
is
True
:
if
video_object
.
video_trans_status
==
'Corrupt File'
:
return
[]
...
...
@@ -116,8 +122,11 @@ class VedaHeal(object):
except
KeyError
:
pass
# list comparison
return
self
.
differentiate_encodes
(
uncompleted_encodes
,
expected_encodes
,
video_object
)
requeued_encodes
=
self
.
differentiate_encodes
(
uncompleted_encodes
,
expected_encodes
,
video_object
)
LOGGER
.
info
(
'[HEAL] : Status: {status}, Encodes: {encodes}'
.
format
(
status
=
self
.
val_status
,
encodes
=
requeued_encodes
)
)
return
requeued_encodes
def
differentiate_encodes
(
self
,
uncompleted_encodes
,
expected_encodes
,
video_object
):
"""
...
...
instance_config.yaml
View file @
71e238b5
...
...
@@ -105,7 +105,7 @@ val_username:
val_transcript_create_url
:
val_video_transcript_status_url
:
# Celery Worker Config Information
rabbitmq_broker
:
rabbitmq_pass
:
rabbitmq_user
:
...
...
static_config.yaml
View file @
71e238b5
...
...
@@ -2,11 +2,12 @@
# This configuration should only have static settings.
# Celery Info
onsite_worker
:
False
celery_threads
:
1
celery_app_name
:
veda_production
# can do multiple queues like so: foo,bar,baz
celery_worker_queue
:
encode_worker
celery_worker_queue
:
encode_worker,large_encode_worker
celery_deliver_queue
:
deliver_worker
celery_
threads
:
1
celery_
heal_queue
:
heal_queue
# S3 upload settings
multi_upload_barrier
:
2000000000
...
...
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