Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #103 from edx/mrehan/revert-old-transcripts-workflow
Browse files Browse the repository at this point in the history
[EDUCATOR-2768] Revert 3rd party transcripts custom workflow
  • Loading branch information
Qubad786 authored May 9, 2018
2 parents c881f19 + 2b143c2 commit 5404599
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 248 deletions.
171 changes: 0 additions & 171 deletions control/old_veda_deliver_cielo.py

This file was deleted.

69 changes: 0 additions & 69 deletions control/veda_deliver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
import datetime
import ftplib
import logging
import shutil
from os.path import expanduser
Expand All @@ -19,7 +18,6 @@
from boto.s3.key import Key
from django.core.urlresolvers import reverse

from control.old_veda_deliver_cielo import Cielo24TranscriptOld
from control_env import *
from veda_deliver_cielo import Cielo24Transcript
from veda_deliver_youtube import DeliverYoutube
Expand Down Expand Up @@ -129,11 +127,6 @@ def run(self):
u1.encode_size = self.video_proto.filesize
u1.save()

# TODO: Warning! this shall be removed once 3rd party credentials
# for existing courses are migrated according to new flow.
self._THREEPLAY_UPLOAD()
self._CIELO24_UPLOAD()

self.status = self._DETERMINE_STATUS()
self._UPDATE_DATA()
self._CLEANUP()
Expand Down Expand Up @@ -624,68 +617,6 @@ def start_3play_transcription_process(self, encoded_file):
self.video_query.studio_id,
)

def _CIELO24_UPLOAD(self):
"""
Note: This is part of the old flow which was deprecated when transcript phase 1 was reased.
"""
# TODO: this must be removed once existing 3rd party credentials are migrated according
# to the new workflow.
if self.video_query.inst_class.c24_proc is False:
return None

if self.encode_profile != 'desktop_mp4':
return None

cielojob = Cielo24TranscriptOld(
veda_id=self.video_query.edx_id
)
cielojob.perform_transcription()
LOGGER.info('[DELIVERY] {id} : Cielo24 job sent '.format(id=self.video_query.edx_id))

def _THREEPLAY_UPLOAD(self):
"""
Note: This is part of the old flow which was deprecated when transcript phase 1 was reased.
"""
# TODO: this must be removed once existing 3rd party credentials are migrated according
# to the new workflow.
if self.video_query.inst_class.tp_proc is False:
return None

if self.encode_profile != 'desktop_mp4':
return None

ftp1 = ftplib.FTP(
self.auth_dict['threeplay_ftphost']
)
user = self.video_query.inst_class.tp_username.strip()
passwd = self.video_query.inst_class.tp_password.strip()
try:
ftp1.login(user, passwd)
except:
LOGGER.error('[DELIVERY] {file} : 3Play Authentication Failure'.format(file=self.encoded_file))
try:
ftp1.cwd(
self.video_query.inst_class.tp_speed
)
except:
ftp1.mkd(
self.video_query.inst_class.tp_speed
)
ftp1.cwd(
self.video_query.inst_class.tp_speed
)
os.chdir(self.node_work_directory)

ftp1.storbinary(
'STOR ' + self.encoded_file,
open(os.path.join(
self.node_work_directory,
self.encoded_file
), 'rb')
)

os.chdir(homedir)

def YOUTUBE_SFTP(self, review=False):
if self.video_query.inst_class.yt_proc is False:
if self.video_query.inst_class.review_proc is False:
Expand Down
5 changes: 0 additions & 5 deletions instance_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,4 @@ sg_server_path:
sg_script_name:
sg_script_key:

# ---
# Endpoints
# ---
threeplay_ftphost:

...
3 changes: 0 additions & 3 deletions static_config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
# This configuration should only have static settings.

# 3PlayMedia FTP host for old workflow
threeplay_ftphost: ftp.3playmedia.com

# s3 bucket static prefixes
edx_s3_processed_prefix: prod-edx/processed/
edx_s3_rejected_prefix: prod-edx/rejected/
Expand Down

0 comments on commit 5404599

Please sign in to comment.