Update speedyf/process.py

This commit is contained in:
Fred Boniface 2024-04-30 21:41:17 +01:00
parent 2464c9bf7c
commit 780606ab2b

View File

@ -4,10 +4,13 @@ from subprocess import run
semaphore = asyncio.Semaphore(2)
async def process_pdf(file_path, ctx):
def generate_cmd(opts):
return "cmd"
async def process_pdf(ctx, file_path, opts):
async with semaphore:
# Set status to runnin
cmd = "cmd"
# Set status to running
cmd = generate_cmd(opts)
process = await asyncio.create_subprocess_exec(cmd)
await process.await()
# Set status to done.