4444
4545from .rspy_models import Feature , FeatureCollectionModel
4646
47- local_mode = env_bool ("RSPY_LOCAL_MODE" , default = False )
47+ LOCAL_MODE = env_bool ("RSPY_LOCAL_MODE" , default = False )
4848
4949
5050# Custom authentication class
@@ -619,7 +619,7 @@ def manage_dask_tasks_results(self, client: Client, catalog_collection: str):
619619 self .log_job_execution (JobStatus .successful , 100 , "Finished" )
620620 self .logger .info ("Tasks monitoring finished" )
621621
622- def dask_cluster_connect (self ) -> Client :
622+ def dask_cluster_connect (self ) -> Client : # pylint: disable=too-many-branches,too-many-statements
623623 """Connects a dask cluster scheduler
624624 Establishes a connection to a Dask cluster, either in a local environment or via a Dask Gateway in
625625 a Kubernetes cluster. This method checks if the cluster is already created (for local mode) or connects
@@ -682,7 +682,7 @@ def dask_cluster_connect(self) -> Client:
682682 cluster_name = os .environ ["RSPY_DASK_STAGING_CLUSTER_NAME" ]
683683
684684 # In local mode, authenticate to the dask cluster with username/password
685- if local_mode :
685+ if LOCAL_MODE :
686686 gateway_auth = BasicAuth (
687687 os .environ ["LOCAL_DASK_USERNAME" ],
688688 os .environ ["LOCAL_DASK_PASSWORD" ],
@@ -708,7 +708,7 @@ def dask_cluster_connect(self) -> Client:
708708
709709 # In local mode, get the first cluster from the gateway.
710710 cluster_id = None
711- if local_mode :
711+ if LOCAL_MODE :
712712 if clusters :
713713 cluster_id = clusters [0 ].name
714714
0 commit comments