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

EsupPortail / Esup-Pod / 6377635546

02 Oct 2023 08:21AM UTC coverage: 70.396% (-1.6%) from 71.99%
6377635546

push

github

web-flow
Merge pull request #900 from EsupPortail/develop

[DONE] #3.4.0

1509 of 1509 new or added lines in 58 files covered. (100.0%)

9288 of 13194 relevant lines covered (70.4%)

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
×
28
def start_encoding_task(video_id, video_path, cut_start, cut_end):
×
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)
×
35
    encoding_video = Encoding_video(video_id, video_path, cut_start, cut_end)
×
36
    encoding_video.start_encode()
×
37
    print("End of the encoding of the video")
×
38
    start_importing_task.delay(
×
39
        encoding_video.start,
40
        video_id,
41
        video_path,
42
        cut_start,
43
        cut_end,
44
        encoding_video.stop,
45
    )
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

© 2025 Coveralls, Inc