@@ -1661,8 +1661,7 @@ def list_category(self, category, items=50):
16611661 "success" : resp .status_code == 200 ,
16621662 "status" : resp .status_code ,
16631663 "url" : url ,
1664- "details" : "Execution Auth is not implemented for this action yet. Please use the API directly."
1665-
1664+ "details" : "Execution Auth is not implemented for this action yet. Please use the API directly." ,
16661665 "body" : resp .text ,
16671666 }
16681667
@@ -4480,14 +4479,48 @@ def execute():
44804479 # pass
44814480
44824481 # Can run channel_timeout low because socket closes, BUT thread stays open
4482+
4483+ threads = 8
4484+ backlog = 2048
4485+ channel_timeout = 2
4486+ connection_limit = 1000
4487+
4488+ found_threads = os .getenv ("SHUFFLE_APP_SDK_WAITRESS_THREADS" , "" )
4489+ found_backlog = os .getenv ("SHUFFLE_APP_SDK_WAITRESS_BACKLOG" , "" )
4490+ found_channel_timeout = os .getenv ("SHUFFLE_APP_SDK_WAITRESS_CHANNEL_TIMEOUT" , "" )
4491+ found_connection_limit = os .getenv ("SHUFFLE_APP_SDK_WAITRESS_CONNECTION_LIMIT" , "" )
4492+ if len (found_threads ) > 0 :
4493+ try :
4494+ threads = int (found_threads )
4495+ except Exception as e :
4496+ logger .info (f"[WARNING] Failed parsing SHUFFLE_APP_SDK_WAITRESS_THREADS: { e } " )
4497+
4498+ if len (found_backlog ) > 0 :
4499+ try :
4500+ backlog = int (found_backlog )
4501+ except Exception as e :
4502+ logger .info (f"[WARNING] Failed parsing SHUFFLE_APP_SDK_WAITRESS_BACKLOG: { e } " )
4503+
4504+ if len (found_channel_timeout ) > 0 :
4505+ try :
4506+ channel_timeout = int (found_channel_timeout )
4507+ except Exception as e :
4508+ logger .info (f"[WARNING] Failed parsing SHUFFLE_APP_SDK_WAITRESS_CHANNEL_TIMEOUT: { e } " )
4509+
4510+ if len (found_connection_limit ) > 0 :
4511+ try :
4512+ connection_limit = int (found_connection_limit )
4513+ except Exception as e :
4514+ logger .info (f"[WARNING] Failed parsing SHUFFLE_APP_SDK_WAITRESS_CONNECTION_LIMIT: { e } " )
4515+
44834516 serve (
44844517 flask_app ,
44854518 host = "0.0.0.0" ,
44864519 port = port ,
4487- threads = 8 ,
4488- backlog = 2048 ,
4489- channel_timeout = 2 ,
4490- connection_limit = 1000 ,
4520+ threads = threads ,
4521+ backlog = backlog ,
4522+ channel_timeout = channel_timeout ,
4523+ connection_limit = connection_limit ,
44914524 expose_tracebacks = True ,
44924525 asyncore_use_poll = True ,
44934526 )
0 commit comments