From f1cdf7420223e39a8bcf67bf163a585ae98b98fa Mon Sep 17 00:00:00 2001 From: vijeth-aradhya Date: Tue, 29 Aug 2017 11:26:12 +0530 Subject: [PATCH] Change complimentary_task to complementary_tas Closes #11 --- mediagoblin/media_types/video/processing.py | 4 ++-- mediagoblin/tests/test_submission.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index c07aa303..c72c12f2 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -185,7 +185,7 @@ def main_task(entry_id, resolution, medium_size, **process_info): @celery.task() -def complimentary_task(entry_id, resolution, medium_size, **process_info): +def complementary_task(entry_id, resolution, medium_size, **process_info): """ Side celery task to transcode the video to other resolutions """ @@ -595,7 +595,7 @@ class VideoProcessingManager(ProcessingManager): if comp_res != def_res: priority_num += -1 tasks_list.append( - complimentary_task.signature(args=(entry.id, comp_res, + complementary_task.signature(args=(entry.id, comp_res, ACCEPTED_RESOLUTIONS[comp_res]), kwargs=reprocess_info, queue='default', priority=priority_num, immutable=True) diff --git a/mediagoblin/tests/test_submission.py b/mediagoblin/tests/test_submission.py index 40cd771d..f08a25f0 100644 --- a/mediagoblin/tests/test_submission.py +++ b/mediagoblin/tests/test_submission.py @@ -61,7 +61,7 @@ from mediagoblin.tools import template from mediagoblin.media_types.image import ImageMediaManager from mediagoblin.media_types.pdf.processing import check_prerequisites as pdf_check_prerequisites from mediagoblin.media_types.video.processing import ( - VideoProcessingManager, main_task, complimentary_task, group, + VideoProcessingManager, main_task, complementary_task, group, processing_cleanup, CommonVideoProcessor) from mediagoblin.media_types.video.util import ACCEPTED_RESOLUTIONS from mediagoblin.submit.lib import new_upload_entry, run_process_media @@ -602,7 +602,7 @@ class TestSubmissionVideo(BaseTestSubmission): assert result[i][2] == media_file.file_path @mock.patch('mediagoblin.media_types.video.processing.processing_cleanup.signature') - @mock.patch('mediagoblin.media_types.video.processing.complimentary_task.signature') + @mock.patch('mediagoblin.media_types.video.processing.complementary_task.signature') @mock.patch('mediagoblin.media_types.video.processing.main_task.signature') def test_celery_tasks(self, mock_main_task, mock_comp_task, mock_cleanup): @@ -674,7 +674,7 @@ class TestSubmissionVideo(BaseTestSubmission): if comp_res != def_res: priority_num += -1 tasks_list.append( - complimentary_task.signature(args=(entry.id, comp_res, + complementary_task.signature(args=(entry.id, comp_res, ACCEPTED_RESOLUTIONS[comp_res]), kwargs=reprocess_info, queue='default', priority=priority_num, immutable=True) @@ -709,7 +709,7 @@ class TestSubmissionVideo(BaseTestSubmission): if comp_res != def_res: priority_num += -1 tasks_list.append( - complimentary_task.signature(args=(entry.id, comp_res, + complementary_task.signature(args=(entry.id, comp_res, ACCEPTED_RESOLUTIONS[comp_res]), kwargs=reprocess_info, queue='default', priority=priority_num, immutable=True) -- 2.25.1