Commit 547f270f by Gregory Martin

Final cleanup

parent b340f9c7
......@@ -8,6 +8,7 @@ Meant to enforce a lack of DB connection, so information about sequential IDs in
import logging
import os
import subprocess
import sys
import yaml
......@@ -16,6 +17,8 @@ from boto.exception import S3ResponseError
from boto.s3.key import Key
from os.path import expanduser
from video_worker.reporting import Output
logger = logging.getLogger(__name__)
homedir = expanduser("~")
......@@ -73,7 +76,6 @@ class ForceColorspaceEncode(object):
)
encoding.run_file()
x += 100
break
class FileReEncode(object):
......@@ -140,11 +142,19 @@ class FileReEncode(object):
sys_cmd += " -crf 27 -movflags faststart {new_filepath}".format(
new_filepath=new_filepath
)
return_code = os.system(sys_cmd)
if return_code != 0:
print('[SCRIPT] Encode Error : {code}'.format(code=return_code))
return
print('[SCRIPT] Encode Complete : {code}'.format(code=return_code))
Output.status_bar(
process=subprocess.Popen(
sys_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True,
universal_newlines=True
)
)
# to be polite
print
print('[SCRIPT] Encode Complete')
def upload_file(self):
"""
......@@ -170,8 +180,8 @@ class FileReEncode(object):
"""
Delete working files
"""
print('[SCRIPT] Cleaning Workdir')
for file in os.listdir(self.workdir):
print file
os.remove(os.path.join(self.workdir, file))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment