Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Jun 17, 2024
1 parent b6f1404 commit a32ec2a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch-name-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
BRANCH_REGEX: '^((feature|github|hotfix|bugfix|fix|bug|docs|refactor)\/.+)|(release\/v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))$'
BRANCH_REGEX: '^((feature|github|dependabot|hotfix|bugfix|fix|bug|docs|refactor)\/.+)|(release\/v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))$'

jobs:
branch-name-check:
Expand Down
2 changes: 0 additions & 2 deletions fedn/network/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,6 @@ def add_client(self, client_id, preferred_combiner, remote_addr):
"certificate": cert,
"helper_type": self.control.statestore.get_helper(),
}
logger.info(f"Sending payload: {payload}")

return jsonify(payload)

def get_initial_model(self):
Expand Down
20 changes: 12 additions & 8 deletions fedn/network/grpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@


class Server:
""" Class for configuring and launching the gRPC server."""
"""Class for configuring and launching the gRPC server."""

def __init__(self, servicer, modelservicer, config):

set_log_level_from_string(config.get("verbosity", "INFO"))
set_log_stream(config.get("logfile", None))

Expand All @@ -34,21 +33,26 @@ def __init__(self, servicer, modelservicer, config):
health_pb2_grpc.add_HealthServicer_to_server(self.health_servicer, self.server)

if config["secure"]:
logger.info(f'Creating secure gRPCS server using certificate: {config["certificate"]}')
logger.info("Creating secure gRPCS server using certificate")
server_credentials = grpc.ssl_server_credentials(
((config["key"], config["certificate"],),))
self.server.add_secure_port(
"[::]:" + str(config["port"]), server_credentials)
(
(
config["key"],
config["certificate"],
),
)
)
self.server.add_secure_port("[::]:" + str(config["port"]), server_credentials)
else:
logger.info("Creating gRPC server")
self.server.add_insecure_port("[::]:" + str(config["port"]))

def start(self):
""" Start the gRPC server."""
"""Start the gRPC server."""
logger.info("gRPC Server started")
self.server.start()

def stop(self):
""" Stop the gRPC server."""
"""Stop the gRPC server."""
logger.info("gRPC Server stopped")
self.server.stop(0)

0 comments on commit a32ec2a

Please sign in to comment.