Skip to content

Commit

Permalink
fixed the function exxecution during import
Browse files Browse the repository at this point in the history
  • Loading branch information
sowmyasris committed Jul 31, 2024
1 parent 9961836 commit 69795a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fedn/network/api/gunicorn_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ def run_gunicorn(app, workers=4):
"workers": workers,
}
GunicornApp(app, options).run()
if __name__ == "main":
run_gunicorn()
4 changes: 2 additions & 2 deletions fedn/network/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from fedn.network.api.interface import API
from fedn.network.api.shared import control, statestore
from fedn.network.api.v1 import _routes
from fedn.network.api.gunicorn_app import run_gunicorn
import gunicorn_app

custom_url_prefix = os.environ.get("FEDN_CUSTOM_URL_PREFIX", False)
# statestore_config,modelstorage_config,network_id,control=set_statestore_config()
Expand Down Expand Up @@ -636,6 +636,6 @@ def start_server_api():
if debug:
app.run(debug=debug, port=port, host=host)
else:
run_gunicorn(app)
gunicorn_app.run_gunicorn(app)
if __name__ == "__main__":
start_server_api()

0 comments on commit 69795a1

Please sign in to comment.