_utils
| FUNCTION | DESCRIPTION |
|---|---|
check_ssh_or_fail_and_cleanup |
Check SSH connection. |
edit_pyproject_toml_in_place_ssh |
Wrapper of |
Classes
Functions:
_copy_wheel_file_ssh(*, task_group, fractal_ssh, logger_name)
Handle the situation where task_group.archive_path is not part of
task_group.path, by copying archive_path into path.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The new |
Source code in fractal_server/tasks/v2/ssh/_utils.py
_customize_and_run_template(*, template_filename, replacements, script_dir_local, script_dir_remote, prefix, fractal_ssh, logger_name)
Customize one of the template bash scripts, transfer it to the remote host via SFTP and then run it via SSH.
| PARAMETER | DESCRIPTION |
|---|---|
|
Filename of the template file (ends with ".sh").
TYPE:
|
|
Dictionary of replacements. |
|
Remote scripts directory
TYPE:
|
|
Local folder where the script will be placed.
TYPE:
|
|
Prefix for the script filename.
TYPE:
|
|
FractalSSH object
TYPE:
|
Source code in fractal_server/tasks/v2/ssh/_utils.py
_customize_and_send_template(*, template_filename, replacements, script_dir_local, script_dir_remote, prefix, fractal_ssh, logger_name)
Customize a template bash scripts and transfer it to the remote host.
| PARAMETER | DESCRIPTION |
|---|---|
|
Filename of the template file (ends with ".sh").
TYPE:
|
|
Dictionary of replacements. |
|
Local folder where the script will be placed.
TYPE:
|
|
Remote scripts directory
TYPE:
|
|
Prefix for the script filename.
TYPE:
|
|
FractalSSH object
TYPE:
|
Source code in fractal_server/tasks/v2/ssh/_utils.py
check_ssh_or_fail_and_cleanup(*, fractal_ssh, task_group, task_group_activity, logger_name, log_file_path, db)
Check SSH connection.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
Whether SSH connection is OK. |
Source code in fractal_server/tasks/v2/ssh/_utils.py
edit_pyproject_toml_in_place_ssh(*, fractal_ssh, pyproject_toml_path, resource)
Wrapper of simplify_pyproject_toml, with I/O.