Code cleanup

This commit is contained in:
Brett Williams
2023-06-03 17:06:09 -05:00
parent a9257a6bf5
commit 43a1698ab8
2 changed files with 3 additions and 11 deletions

View File

@@ -12,15 +12,6 @@ from lib.render_workers.base_worker import RenderStatus
logger = logging.getLogger()
def post_job_to_server(input_path, job_list, hostname, server_port=8080):
# Pack job data and submit to server
job_files = {'file': (os.path.basename(input_path), open(input_path, 'rb'), 'application/octet-stream'),
'json': (None, json.dumps(job_list), 'application/json')}
req = requests.post(f'http://{hostname}:{server_port}/api/add_job', files=job_files)
return req
def generate_thumbnail_for_job(job, thumb_video_path, thumb_image_path, max_width=320):
# Simple thread to generate thumbs in background