-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.py
More file actions
36 lines (28 loc) · 1010 Bytes
/
tasks.py
File metadata and controls
36 lines (28 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-FileCopyrightText: 2025 Meinhard Kissich
# SPDX-License-Identifier: MIT
from task.convert_to_markdown import do_convert_to_markdown
from task.make_listenable import do_make_listenable
from task.make_tts import do_make_tts
from task.archive import do_archive
from task.encode_reference import do_encode_reference
from celery import Celery
app = Celery(
'tasks',
broker='redis://localhost:6379/0',
backend='redis://localhost:6379/0'
)
@app.task
def convert_to_markdown(file_bytes, ofile=None):
return do_convert_to_markdown(file_bytes, ofile=None)
@app.task
def make_listenable(markdown, config_dict, ofile=None):
return do_make_listenable(markdown, config_dict, ofile)
@app.task
def make_tts(titles, script, odir, config_dict):
return do_make_tts(titles, script, odir, config_dict)
@app.task
def archive(idir, ofile):
return do_archive(idir, ofile)
@app.task
def encode_reference(ifile, ofile, config_dict):
return do_encode_reference(ifile, ofile, config_dict)