File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Gunicorn config."""
22# NOTE: Must be before we import or call anything that may be synchronous.
33from gevent import monkey
4-
5- monkey .patch_all ()
6-
74import logging
85from bayesian .settings import GUNICORN_SETTINGS , log_all_settings
96from prometheus_flask_exporter .multiprocess import GunicornPrometheusMetrics
107
8+ monkey .patch_all ()
9+
1110workers = GUNICORN_SETTINGS .workers
1211worker_class = GUNICORN_SETTINGS .worker_class
1312timeout = GUNICORN_SETTINGS .timeout
Original file line number Diff line number Diff line change @@ -163,11 +163,11 @@ objects:
163163 timeoutSeconds : 10
164164 resources :
165165 requests :
166- memory : " 512Mi "
167- cpu : " 500m "
166+ memory : ${{MEMORY_REQUEST}}
167+ cpu : ${{CPU_REQUEST}}
168168 limits :
169- memory : " 1024Mi "
170- cpu : " 1000m "
169+ memory : ${{MEMORY_LIMIT}}
170+ cpu : ${CPU_LIMIT}
171171 restartPolicy : Always
172172 test : false
173173 triggers :
@@ -246,6 +246,30 @@ parameters:
246246 name : REPLICAS
247247 value : " 1"
248248
249+ - description : Request Number of CPU cores required by each replica
250+ displayName : Request CPU cores
251+ required : true
252+ name : CPU_REQUEST
253+ value : " 500m"
254+
255+ - description : Limit Number of CPU cores required by each replica
256+ displayName : Limit CPU cores
257+ required : true
258+ name : CPU_LIMIT
259+ value : " 3"
260+
261+ - description : Request Memory Required by each replica
262+ displayName : Request Memory
263+ required : true
264+ name : MEMORY_REQUEST
265+ value : " 512Mi"
266+
267+ - description : Limit Memory Required by each replica
268+ displayName : Limit Memory
269+ required : true
270+ name : MEMORY_LIMIT
271+ value : " 5Gi"
272+
249273- description : Batch size for component analysis gremlin query
250274 displayName : Batch size for component analysis gremlin query
251275 required : true
Original file line number Diff line number Diff line change 11[pycodestyle]
2- ignore = E121, E126, E402, W504
3- max-line-length = 100
2+ max-line-length = 100
You can’t perform that action at this time.
0 commit comments