Add speedyf/process.py
This commit is contained in:
parent
8804dcb9ad
commit
42caef4beb
13
speedyf/process.py
Normal file
13
speedyf/process.py
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user