Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def serve(port):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=20))
add_EntityExtractServicer_to_server(SpacyServicer(), server)
server.add_insecure_port(port)
server.start()
log.info("Server started: %s", port)
try:
while True:
time.sleep(84600)
except KeyboardInterrupt:
server.stop(60)
def serve(port):
executor = futures.ThreadPoolExecutor(max_workers=3)
server = grpc.server(executor)
add_EntityExtractServicer_to_server(EntityServicer(), server)
server.add_insecure_port(port)
server.start()
log.info("Server started: %s", port)
try:
while True:
time.sleep(84600)
except KeyboardInterrupt:
server.stop(60)
def serve(port):
executor = futures.ThreadPoolExecutor(max_workers=3)
server = grpc.server(executor)
add_EntityExtractServicer_to_server(EntityServicer(), server)
server.add_insecure_port(port)
server.start()
log.info("Server started: %s", port)
try:
while True:
time.sleep(84600)
except KeyboardInterrupt:
server.stop(60)