Skip to content

Commit

Permalink
added gevent module
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenaH84 committed Feb 21, 2024
1 parent 1684e5a commit 431bb1a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
restart: always
ports:
- "8000:8000"
command: gunicorn -w 1 -b 0.0.0.0:8000 wsgi:server --timeout 500 --worker-class=gevent
command: gunicorn -w 1 -b 0.0.0.0:8000 wsgi:server --timeout 200 --worker-class=gevent
#command: bash -c "julia -e 'using PkgCompiler; PkgCompiler.clear_cache()' && gunicorn -w 1 -b 0.0.0.0:8000 wsgi:server --timeout 200"

nginx:
Expand Down
3 changes: 2 additions & 1 deletion flask_api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pylance==0.6.2
flask_restful==0.3.10
juliacall == 0.9.14
psutil == 3.2.2
gunicorn==21.2.0
gunicorn==21.2.0
gevent==24.2.1
11 changes: 10 additions & 1 deletion streamlit/pages/1_Simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@

# Get page name
url = str(st_javascript("await fetch('').then(r => window.parent.location.href)"))
page_name = url.rsplit('/',1)[1]
url_parts = url.rsplit('/',1)

if len(url_parts) > 1:
# Extract the page name from the last part
page_name = url_parts[1]
else:
# Handle the case where '/' is not found in the URL
page_name = "Unknown"




def run_page():
Expand Down
9 changes: 8 additions & 1 deletion streamlit/pages/2_Results.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@

# Get page name
url = str(st_javascript("await fetch('').then(r => window.parent.location.href)"))
page_name = url.rsplit('/',1)[1]
url_parts = url.rsplit('/',1)

if len(url_parts) > 1:
# Extract the page name from the last part
page_name = url_parts[1]
else:
# Handle the case where '/' is not found in the URL
page_name = "Unknown"


def run_page():
Expand Down

0 comments on commit 431bb1a

Please sign in to comment.