Skip to content

Commit

Permalink
Remove channel closing at shutdown (#3685)
Browse files Browse the repository at this point in the history
LocalChannel, the only extant channel, does not have any close()
behaviour.

This is part of #3515 channel removal.

## Type of change

- Code maintenance/cleanup
  • Loading branch information
benclifford authored Nov 7, 2024
1 parent b531ecc commit b092195
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 48 deletions.
6 changes: 0 additions & 6 deletions parsl/channels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ def pull_file(self, remote_source: str, local_dir: str) -> str:
'''
pass

@abstractmethod
def close(self) -> None:
''' Closes the channel.
'''
pass

@abstractmethod
def makedirs(self, path: str, mode: int = 0o511, exist_ok: bool = False) -> None:
"""Create a directory.
Expand Down
5 changes: 0 additions & 5 deletions parsl/channels/local/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ def push_file(self, source, dest_dir):
def pull_file(self, remote_source, local_dir):
return self.push_file(remote_source, local_dir)

def close(self) -> None:
''' There's nothing to close here, and so this doesn't do anything
'''
pass

def isdir(self, path):
"""Return true if the path refers to an existing directory.
Expand Down
11 changes: 0 additions & 11 deletions parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,17 +1268,6 @@ def cleanup(self) -> None:
executor.shutdown()
logger.info(f"Shut down executor {executor.label}")

if hasattr(executor, 'provider'):
if hasattr(executor.provider, 'script_dir'):
logger.info(f"Closing channel for {executor.label}")

assert hasattr(executor.provider, 'channel'), "Provider with .script_dir must have .channel"
logger.info(f"Closing channel {executor.provider.channel}")
executor.provider.channel.close()
logger.info(f"Closed channel {executor.provider.channel}")

logger.info(f"Closed executor channel for {executor.label}")

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

Expand Down
26 changes: 0 additions & 26 deletions parsl/tests/test_channels/test_dfk_close.py

This file was deleted.

0 comments on commit b092195

Please sign in to comment.