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)
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user