24 lines
669 B
Python
24 lines
669 B
Python
import asyncio
|
|
from archonbot.protocol__plugin.event import ArchonMessageEvent
|
|
|
|
class ArchonWorker:
|
|
def __init__(self):
|
|
self.workflow_queue = asyncio.Queue()
|
|
self.workflow_router = {}
|
|
|
|
def add_event(self, event: ArchonMessageEvent):
|
|
self.workflow_queue.put(event)
|
|
|
|
async def run(self):
|
|
while True:
|
|
try:
|
|
event : ArchonMessageEvent = self.workflow_queue.get()
|
|
match event.target:
|
|
case "plugin":
|
|
pass
|
|
case _:
|
|
pass
|
|
except:
|
|
pass
|
|
finally:
|
|
pass |