Update speedyf/process.py
This commit is contained in:
parent
2464c9bf7c
commit
780606ab2b
@ -4,10 +4,13 @@ from subprocess import run
|
|||||||
|
|
||||||
semaphore = asyncio.Semaphore(2)
|
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:
|
async with semaphore:
|
||||||
# Set status to runnin
|
# Set status to running
|
||||||
cmd = "cmd"
|
cmd = generate_cmd(opts)
|
||||||
process = await asyncio.create_subprocess_exec(cmd)
|
process = await asyncio.create_subprocess_exec(cmd)
|
||||||
await process.await()
|
await process.await()
|
||||||
# Set status to done.
|
# Set status to done.
|
||||||
|
Loading…
Reference in New Issue
Block a user