File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def db_config(db_dir):
76
76
def _support_args (args ):
77
77
ret = subprocess .check_output ([get_rstudio_executable ('rserver' ), '--help' ])
78
78
help_output = ret .decode ()
79
- return {arg : (help_output .find (arg ) != - 1 ) for arg in args }
79
+ return {arg : (help_output .find (f"-- { arg } " ) != - 1 ) for arg in args }
80
80
81
81
def _get_www_frame_origin (default = "same" ):
82
82
try :
@@ -117,11 +117,14 @@ def _get_cmd(port, unix_socket):
117
117
cmd .append (f'--database-config-file={ database_config_file } ' )
118
118
119
119
if supported_args ['www-thread-pool-size' ]:
120
+ thread_pool_size_env = os .getenv ('JUPYTER_RSESSION_PROXY_THREAD_POOL_SIZE' , None )
120
121
try :
121
- thread_pool_size = int (os .getenv ('JUPYTER_RSESSION_PROXY_THREAD_POOL_SIZE' , "" ))
122
- if thread_pool_size > 0 :
123
- cmd .append ('--www-thread-pool-size=' + str (thread_pool_size ))
124
- except :
122
+ if thread_pool_size_env is not None :
123
+ thread_pool_size = int (thread_pool_size_env )
124
+ if thread_pool_size > 0 :
125
+ cmd .append ('--www-thread-pool-size=' + str (thread_pool_size ))
126
+ except ValueError :
127
+ print ("Invalid value for JUPYTER_RSESSION_PROXY_THREAD_POOL_SIZE. Must be an integer." )
125
128
pass
126
129
127
130
if unix_socket != "" :
You can’t perform that action at this time.
0 commit comments