Skip to content

Commit

Permalink
changing app.run debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyal Ben Ivri committed Jul 30, 2024
1 parent fb0413c commit ca4b251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
##################### INIT GLOBAL VARIABLES ##################################

PORT = int(os.environ.get("PORT", 8080))
DEBUG = bool(os.environ.get("DEBUG", "False"))
SERVICE_URL = os.environ.get("SERVICE_URL", f"http://localhost:{PORT}")

TAG_ENGINE_SA = config['DEFAULT']['TAG_ENGINE_SA'].strip()
Expand Down Expand Up @@ -3676,7 +3677,6 @@ def server_error(e):
if __name__ == "__main__":
#os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = "1" # uncomment only when running locally
os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = "1" # to allow for scope changes
time.sleep(5000)
app.run(debug=True, host="0.0.0.0", port=PORT) # for running on Cloud Run
app.run(debug=DEBUG, host="0.0.0.0", port=PORT) # for running on Cloud Run
#app.run(debug=True, port=5000) # for running locally

3 changes: 2 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
pythonpath = .
env =
SERVICE_URL=http://localhost:5000
OAUTHLIB_INSECURE_TRANSPORT=1
OAUTHLIB_INSECURE_TRANSPORT=1
DEBUG=True

0 comments on commit ca4b251

Please sign in to comment.