• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EsupPortail / Esup-Pod / 5424527746

pending completion
5424527746

Pull #899

github

web-flow
Merge 83465db1d into b8d45a116
Pull Request #899: [WIP] Ptitloup/feature new encoding

341 of 341 new or added lines in 8 files covered. (100.0%)

9029 of 12634 relevant lines covered (71.47%)

0.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pod/video_encode_transcript/transcripting_tasks.py
1
# pip3 install celery==5.2.7
2
# pip3 install webvtt-py
3
# pip3 install redis==4.5.4
4
from celery import Celery
×
5
import logging
×
6
from .transcript_model import start_transcripting
×
7
from .importing_transcript_tasks import start_importing_transcript_task
×
8
# call local settings directly
9
# no need to load pod application to send statement
10
from .. import settings
×
11

12
logger = logging.getLogger(__name__)
×
13

14
ENCODING_TRANSCODING_CELERY_BROKER_URL = getattr(
×
15
    settings,
16
    "ENCODING_TRANSCODING_CELERY_BROKER_URL",
17
    ""
18
)
19

20
transcripting_app = Celery(
×
21
    "transcripting_tasks",
22
    broker=ENCODING_TRANSCODING_CELERY_BROKER_URL
23
)
24
transcripting_app.conf.task_routes = {
×
25
    "pod.video_encode_transcript.transcripting_tasks.*": {"queue": "transcripting"}
26
}
27

28

29
# celery \
30
# -A pod.video_encode_transcript.transcripting_tasks worker \
31
# -l INFO -Q transcripting
32
@transcripting_app.task
×
33
def start_transcripting_task(video_id, mp3filepath, duration, lang):
×
34
    """Start the encoding of the video."""
35
    print("Start the transcripting of the video %s" % video_id)
×
36
    msg, webvtt = start_transcripting(mp3filepath, duration, lang)
×
37
    print("End of the transcripting of the video")
×
38
    start_importing_transcript_task.delay(video_id, msg, str(webvtt))
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc