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

EsupPortail / Esup-Pod / 5462629459

pending completion
5462629459

Pull #899

github

web-flow
Merge e759dacb6 into c94f0e331
Pull Request #899: [DONE] Ptitloup/feature new encoding

400 of 400 new or added lines in 14 files covered. (100.0%)

8968 of 12675 relevant lines covered (70.75%)

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
import logging
×
6

7
# call local settings directly
8
# no need to load pod application to send statement
9
try:
×
10
    from ..custom import settings_local
×
11
except ImportError:
×
12
    from .. import settings as settings_local
×
13

14
logger = logging.getLogger(__name__)
×
15

16
ENCODING_TRANSCODING_CELERY_BROKER_URL = getattr(
×
17
    settings_local,
18
    "ENCODING_TRANSCODING_CELERY_BROKER_URL",
19
    ""
20
)
21

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

30

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