_utils
_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:
Type | Description |
---|---|
str
|
The new |
Source code in fractal_server/tasks/v2/ssh/_utils.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
_customize_and_run_template(*, template_filename, replacements, script_dir_local, prefix, fractal_ssh, script_dir_remote, logger_name, login_shell=False)
¶
Customize one of the template bash scripts, transfer it to the remote host via SFTP and then run it via SSH.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_filename
|
str
|
Filename of the template file (ends with ".sh"). |
required |
replacements
|
set[tuple[str, str]]
|
Dictionary of replacements. |
required |
script_dir_local
|
str
|
Local folder where the script will be placed. |
required |
prefix
|
str
|
Prefix for the script filename. |
required |
fractal_ssh
|
FractalSSH
|
FractalSSH object |
required |
script_dir_remote
|
str
|
Remote scripts directory |
required |
login_shell
|
bool
|
If |
False
|
Source code in fractal_server/tasks/v2/ssh/_utils.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
check_ssh_or_fail_and_cleanup(*, fractal_ssh, task_group, task_group_activity, logger_name, log_file_path, db)
¶
Check SSH connection.
Returns:
Type | Description |
---|---|
bool
|
Whether SSH connection is OK. |
Source code in fractal_server/tasks/v2/ssh/_utils.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
edit_pyproject_toml_in_place_ssh(*, fractal_ssh, pyproject_toml_path)
¶
Wrapper of simplify_pyproject_toml
, with I/O.
Source code in fractal_server/tasks/v2/ssh/_utils.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|