Skip to content

Commit 55e1ce7

Browse files
committed
deploy: uswgi ini config for tests
1 parent 11e4978 commit 55e1ce7

File tree

2 files changed

+86
-25
lines changed

2 files changed

+86
-25
lines changed

.d4g-tools/deploy/taipy/uwsgi.ini

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[uwsgi]
2+
http-websockets = true
3+
module = app.main:web_app
4+
master = true
5+
gevent = 1000
6+
7+
need-app = true ; Start fails if app not loaded
8+
strict = true ; Enable strict mode to fully respect config
9+
enable-threads = true ; Multithreading
10+
vacuum = true ; Delete sockets during shutdown
11+
single-interpreter = true ; Enable single-interpreter mode
12+
die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn)
13+
no-orphans = true ; automatically kill workers if master dies
14+
15+
;disable-logging = true ; Disable built-in logging
16+
;log-4xx = true ; but log 4xx's anyway
17+
;log-5xx = true ; and 5xx's
18+
;harakiri = 60 ; forcefully kill workers after ... seconds
19+
; py-callos-afterfork = true ; allow workers to trap signals
20+
21+
22+
; workers = 8 ; Number of workers (syn is processes) to spawn
23+
; cheaper-algo = spare
24+
; cheaper = 2 ; Minimum number of workers allowed
25+
; cheaper-initial = 2 ; Workers created at startup
26+
; cheaper-step = 2 ; How many workers to spawn at a time
27+
; cheaper-overload = 30 ; Length of a cycle in seconds
28+
; worker-reload-mercy = 60 ; How long to wait before forcefully killing workers in seconds
29+
30+
; max-requests = 1000 ; Restart workers after this many requests
31+
; max-worker-lifetime = 3600 ; Restart workers after this many seconds
32+
; reload-on-rss = 2048 ; Restart workers after this much resident memory
33+
34+
## Setting memory limits
35+
# soft limit will prevent cheaper from spawning new workers
36+
# if workers total rss memory is equal or higher
37+
# we use 128MB soft limit below (values are in bytes)
38+
;cheaper-rss-limit-soft = 134217728
39+
40+
# Optional: hard limit will force cheaper to cheap single worker
41+
# if workers total rss memory is equal or higher
42+
# we use 160MB hard limit below (values are in bytes)
43+
;;cheaper-rss-limit-hard = 167772160
44+
45+
[prod]
46+
ini = :uwsgi
47+
http-socket = :5000
48+
logto = %d/uwsgi.log
49+
disable-logging = true ; Disable built-in logging
50+
log-4xx = true ; but log 4xx's anyway
51+
log-5xx = true ; and 5xx's
52+
53+
[dev]
54+
ini = :prod
55+
http-socket = :5001
56+
logto = %d/uwsgi.dev.log
57+
;DEBUG
58+
disable-logging = false
59+
memory-report = true
60+
stats = :9000 ; Stats server
61+
stats-http = true

.pre-commit-config.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
repos:
2-
- repo: https://github.com/charliermarsh/ruff-pre-commit
3-
# Ruff version.
4-
rev: "v0.2.1"
5-
hooks:
6-
- id: ruff
7-
args: [--fix]
8-
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.3.0
10-
hooks:
11-
- id: check-merge-conflict
12-
- id: mixed-line-ending
13-
#- repo: https://github.com/pycqa/bandit
14-
# rev: 1.7.4
15-
# hooks:
16-
# - id: bandit
17-
# exclude: tests/
2+
- repo: https://github.com/charliermarsh/ruff-pre-commit
3+
# Ruff version.
4+
rev: "v0.2.1"
5+
hooks:
6+
- id: ruff
7+
args: [--fix]
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v4.3.0
10+
hooks:
11+
- id: check-merge-conflict
12+
- id: mixed-line-ending
13+
#- repo: https://github.com/pycqa/bandit
14+
# rev: 1.7.4
15+
# hooks:
16+
# - id: bandit
17+
# exclude: tests/
1818

19-
# !COMMENTED OUT FOR NOW:
20-
# TAIPY latest version 3.1.1 (2024/06/12) is affected with 3 CVEs
21-
# jinja2 3.1.4 is affected with 1 CVE
22-
# flask-cors 4.0.0 is affected with 1 CVE
23-
# pymongo 4.6.1 is affected with 1 CVE
19+
# !COMMENTED OUT FOR NOW:
20+
# TAIPY latest version 3.1.1 (2024/06/12) is affected with 3 CVEs
21+
# jinja2 3.1.4 is affected with 1 CVE
22+
# flask-cors 4.0.0 is affected with 1 CVE
23+
# pymongo 4.6.1 is affected with 1 CVE
2424

25-
# - repo: https://github.com/Lucas-C/pre-commit-hooks-safety
26-
# rev: v1.3.1
27-
# hooks:
28-
# - id: python-safety-dependencies-check
25+
# - repo: https://github.com/Lucas-C/pre-commit-hooks-safety
26+
# rev: v1.3.1
27+
# hooks:
28+
# - id: python-safety-dependencies-check

0 commit comments

Comments
 (0)