Skip to content

Commit

Permalink
more WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
beaugunderson committed Mar 15, 2024
1 parent fa85aca commit 6753009
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions plugin_runner/plugin_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,24 @@ async def ReloadPlugins(self, request: ReloadPluginsRequest, context):
yield ReloadPluginsResponse(success=True)


def load_plugins():
# TODO: walk plugins directory, import and add each plugin to
# LOADED_PLUGINS
pass


async def serve():
port = "50051"

server = grpc.aio.server()
add_PluginRunnerServicer_to_server(PluginRunner(), server)
server.add_insecure_port("127.0.0.1:" + port)
logging.info("Starting server, listening on " + port)

add_PluginRunnerServicer_to_server(PluginRunner(), server)

logging.info(f"Starting server, listening on port {port}")

load_plugins()

await server.start()
await server.wait_for_termination()

Expand Down

0 comments on commit 6753009

Please sign in to comment.