Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new statuses #46

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions covalent_ssh_plugin/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from covalent._results_manager import Result
from covalent._shared_files import logger
from covalent._shared_files.config import get_config
from covalent._shared_files.statuses import RunningCategory
from covalent.executor.executor_plugins.remote_executor import RemoteExecutor

executor_plugin_name = "SSHExecutor"
Expand All @@ -52,6 +53,24 @@
}


class RegisteringStatus(RunningCategory):
executor_name = "SSHExecutor"
status_name = "REGISTERING"
description = "Connection established to the remote machine and files are being transferred"


class RunningStatus(RunningCategory):
executor_name = "SSHExecutor"
status_name = "RUNNING"
description = "Execution invoked on the remote machine"


class CompletingStatus(RunningCategory):
executor_name = "SSHExecutor"
status_name = "COMPLETING"
description = "Results files are being retrieved, temporary files are being deleted, and the connection is being closed"


class SSHExecutor(RemoteExecutor):
"""
Async executor class that invokes the input function on a remote server.
Expand Down Expand Up @@ -440,6 +459,8 @@ async def run(
node_id = task_metadata["node_id"]
operation_id = f"{dispatch_id}_{node_id}"

status_store = task_metadata["status_store"]

exception = None

await self._validate_credentials()
Expand Down