PowerTools/main.py

17 lines
488 B
Python
Raw Normal View History

2022-05-22 17:47:33 -04:00
import pathlib
import subprocess
2022-07-30 16:33:31 -04:00
import asyncio
import os
2022-04-18 21:21:51 +00:00
2022-07-30 16:33:31 -04:00
HOME_DIR = str(pathlib.Path(os.getcwd()).parent.parent.resolve())
PARENT_DIR = str(pathlib.Path(__file__).parent.resolve())
2022-04-29 21:01:24 -04:00
class Plugin:
2022-07-30 16:33:31 -04:00
backend_proc = None
2022-04-18 21:21:51 +00:00
# Asyncio-compatible long-running code, executed in a task when the plugin is loaded
async def _main(self):
2022-07-30 16:33:31 -04:00
# startup
#self.backend_proc = subprocess.Popen([PARENT_DIR + "/bin/backend"])
2022-05-13 14:01:48 -04:00
while True:
await asyncio.sleep(1)