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):
7676    def  _support_args (args ):
7777        ret  =  subprocess .check_output ([get_rstudio_executable ('rserver' ), '--help' ])
7878        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 }
8080
8181    def  _get_www_frame_origin (default = "same" ):
8282        try :
@@ -117,11 +117,14 @@ def _get_cmd(port, unix_socket):
117117            cmd .append (f'--database-config-file={ database_config_file }  )
118118
119119        if  supported_args ['www-thread-pool-size' ]:
120+             thread_pool_size_env  =  os .getenv ('JUPYTER_RSESSION_PROXY_THREAD_POOL_SIZE' , None )
120121            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." )
125128                pass 
126129
127130        if  unix_socket  !=  "" :
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments