diff --git a/speedyf/process.py b/speedyf/process.py new file mode 100644 index 0000000..5b58b5d --- /dev/null +++ b/speedyf/process.py @@ -0,0 +1,13 @@ +import asyncio +from functools import partial +from subprocess import run + +semaphore = asyncio.Semaphore(2) + +async def process_pdf(file_path, ctx): + async with semaphore: + # Set status to runnin + cmd = "cmd" + process = await asyncio.create_subprocess_exec(cmd) + await process.await() + # Set status to done.