Commit b89f3469 authored by Matteo's avatar Matteo
Browse files

update

parent bccb2259
...@@ -3,7 +3,6 @@ import subprocess ...@@ -3,7 +3,6 @@ import subprocess
from concurrent import futures from concurrent import futures
from typing import Any, Callable from typing import Any, Callable
import grpc import grpc
import time
from grpc import StatusCode from grpc import StatusCode
from rich.console import Console from rich.console import Console
...@@ -106,12 +105,12 @@ class VideoAnalyserServicer(arp_pb2_grpc.AIMServicer): ...@@ -106,12 +105,12 @@ class VideoAnalyserServicer(arp_pb2_grpc.AIMServicer):
def serve(console): def serve(console):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
arp_pb2_grpc.add_AIMServicer_to_server(VideoAnalyserServicer(console), server) arp_pb2_grpc.add_AIMServicer_to_server(VideoAnalyserServicer(console), server)
server.add_insecure_port('[::]:50052') server.add_insecure_port('[::]:50051')
server.start() server.start()
server.wait_for_termination() server.wait_for_termination()
if __name__ == '__main__': if __name__ == '__main__':
console = Console() console = Console()
console.print('Server started at localhost:50052 :satellite:') console.print('Server started at localhost:50051 :satellite:')
serve(console) serve(console)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment