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

EsupPortail / Esup-Pod / 5424233138

pending completion
5424233138

Pull #899

github

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

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

9028 of 12629 relevant lines covered (71.49%)

0.71 hits per line

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

0.0
/pod/video_encode_transcript/encoding_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
from .Encoding_video import Encoding_video
×
6
from .importing_tasks import start_importing_task
×
7
import logging
×
8

9
# call local settings directly
10
# no need to load pod application to send statement
11
from .. import settings
×
12

13
logger = logging.getLogger(__name__)
×
14

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

21
encoding_app = Celery(
×
22
    "encoding_tasks",
23
    broker=ENCODING_TRANSCODING_CELERY_BROKER_URL
24
)
25
encoding_app.conf.task_routes = {
×
26
    "pod.video_encode_transcript.encoding_tasks.*": {"queue": "encoding"}
27
}
28

29

30
# celery -A pod.video_encode_transcript.encoding_tasks worker -l INFO -Q encoding
31
@encoding_app.task
×
32
def start_encoding_task(video_id, video_path, cut_start, cut_end):
×
33
    """Start the encoding of the video."""
34
    print("Start the encoding of the video")
×
35
    print(video_id, video_path, cut_start, cut_end)
×
36
    encoding_video = Encoding_video(video_id, video_path, cut_start, cut_end)
×
37
    encoding_video.start_encode()
×
38
    print("End of the encoding of the video")
×
39
    start_importing_task.delay(
×
40
        encoding_video.start,
41
        video_id,
42
        video_path,
43
        cut_start,
44
        cut_end,
45
        encoding_video.stop
46
    )
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