Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
MPAI-Private
MPAI-CAE
arp
Video Analyzer
Commits
b89f3469
Commit
b89f3469
authored
Apr 22, 2023
by
Matteo
Browse files
update
parent
bccb2259
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
b89f3469
...
...
@@ -3,7 +3,6 @@ import subprocess
from
concurrent
import
futures
from
typing
import
Any
,
Callable
import
grpc
import
time
from
grpc
import
StatusCode
from
rich.console
import
Console
...
...
@@ -106,12 +105,12 @@ class VideoAnalyserServicer(arp_pb2_grpc.AIMServicer):
def
serve
(
console
):
server
=
grpc
.
server
(
futures
.
ThreadPoolExecutor
(
max_workers
=
10
))
arp_pb2_grpc
.
add_AIMServicer_to_server
(
VideoAnalyserServicer
(
console
),
server
)
server
.
add_insecure_port
(
'[::]:5005
2
'
)
server
.
add_insecure_port
(
'[::]:5005
1
'
)
server
.
start
()
server
.
wait_for_termination
()
if
__name__
==
'__main__'
:
console
=
Console
()
console
.
print
(
'Server started at localhost:5005
2
:satellite:'
)
console
.
print
(
'Server started at localhost:5005
1
:satellite:'
)
serve
(
console
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment