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

EsupPortail / Esup-Pod / 7179389481

12 Dec 2023 09:24AM UTC coverage: 70.116%. First build
7179389481

Pull #1006

github

web-flow
Merge e2a9e2b59 into 1d788ce13
Pull Request #1006: [DONE] Feature dressing video

114 of 220 new or added lines in 9 files covered. (51.82%)

9493 of 13539 relevant lines covered (70.12%)

0.7 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, "ENCODING_TRANSCODING_CELERY_BROKER_URL", ""
18
)
19

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

25

26
# celery -A pod.video_encode_transcript.encoding_tasks worker -l INFO -Q encoding
27
@encoding_app.task
×
NEW
28
def start_encoding_task(video_id, video_path, cut_start, cut_end, dressing):
×
29
    """Start the encoding of the video."""
30
    print("Start the encoding of the video")
×
31
    from .Encoding_video import Encoding_video
×
32
    from .importing_tasks import start_importing_task
×
33

34
    print(video_id, video_path, cut_start, cut_end)
×
NEW
35
    encoding_video = Encoding_video(video_id, video_path, cut_start, cut_end,
×
36
                                    dressing)
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
        encoding_video.dressing
47
    )
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