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