Skip to content

Commit 08aa003

Browse files
authored
Remove unused DFK initialization for multiple provider channels (#3683)
This was previously used by the AdHocProvider, removed in PR #3676 ## Type of change - Code maintenance/cleanup
1 parent d6dba38 commit 08aa003

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

parsl/dataflow/dflow.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,12 +1186,7 @@ def add_executors(self, executors: Sequence[ParslExecutor]) -> None:
11861186
executor.provider.script_dir = os.path.join(self.run_dir, 'submit_scripts')
11871187
os.makedirs(executor.provider.script_dir, exist_ok=True)
11881188

1189-
if hasattr(executor.provider, 'channels'):
1190-
logger.debug("Creating script_dir across multiple channels")
1191-
for channel in executor.provider.channels:
1192-
self._create_remote_dirs_over_channel(executor.provider, channel)
1193-
else:
1194-
self._create_remote_dirs_over_channel(executor.provider, executor.provider.channel)
1189+
self._create_remote_dirs_over_channel(executor.provider, executor.provider.channel)
11951190

11961191
self.executors[executor.label] = executor
11971192
executor.start()
@@ -1275,20 +1270,14 @@ def cleanup(self) -> None:
12751270

12761271
if hasattr(executor, 'provider'):
12771272
if hasattr(executor.provider, 'script_dir'):
1278-
logger.info(f"Closing channel(s) for {executor.label}")
1273+
logger.info(f"Closing channel for {executor.label}")
12791274

1280-
if hasattr(executor.provider, 'channels'):
1281-
for channel in executor.provider.channels:
1282-
logger.info(f"Closing channel {channel}")
1283-
channel.close()
1284-
logger.info(f"Closed channel {channel}")
1285-
else:
1286-
assert hasattr(executor.provider, 'channel'), "If provider has no .channels, it must have .channel"
1287-
logger.info(f"Closing channel {executor.provider.channel}")
1288-
executor.provider.channel.close()
1289-
logger.info(f"Closed channel {executor.provider.channel}")
1275+
assert hasattr(executor.provider, 'channel'), "Provider with .script_dir must have .channel"
1276+
logger.info(f"Closing channel {executor.provider.channel}")
1277+
executor.provider.channel.close()
1278+
logger.info(f"Closed channel {executor.provider.channel}")
12901279

1291-
logger.info(f"Closed executor channel(s) for {executor.label}")
1280+
logger.info(f"Closed executor channel for {executor.label}")
12921281

12931282
logger.info("Terminated executors")
12941283
self.time_completed = datetime.datetime.now()

0 commit comments

Comments
 (0)