_pixi_slurm_ssh
_log_change_of_job_state(*, old_state, new_state, logger_name)
¶
Emit a log for state changes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
old_state
|
str | None
|
|
required |
new_state
|
str
|
|
required |
logger_name
|
str
|
|
required |
Source code in fractal_server/tasks/v2/ssh/_pixi_slurm_ssh.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
_run_squeue(*, fractal_ssh, squeue_cmd, logger_name)
¶
Run a squeue
command and handle exceptions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fractal_ssh
|
FractalSSH
|
|
required |
logger_name
|
str
|
|
required |
squeue_cmd
|
str
|
|
required |
Return
state: The SLURM-job state.
Source code in fractal_server/tasks/v2/ssh/_pixi_slurm_ssh.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
_verify_success_file_exists(*, fractal_ssh, success_file_remote, logger_name, stderr_remote)
¶
Fail if the success sentinel file does not exist remotely.
Note: the FractalSSH
methods in this function may fail, and such failures
are not handled in this function. Any such failure, however, will lead to
a "failed" task-group lifecycle activity (because it will raise an
exception from within run_script_on_remote_slurm
, which will then be
handled at the calling-function level.
Source code in fractal_server/tasks/v2/ssh/_pixi_slurm_ssh.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
run_script_on_remote_slurm(*, script_path, slurm_config, fractal_ssh, logger_name, log_file_path, prefix, db, activity)
¶
Run a pixi install
script as a SLURM job.
NOTE: This is called from within a try/except, thus we can use exceptions as a mechanism to propagate failure/errors.
Source code in fractal_server/tasks/v2/ssh/_pixi_slurm_ssh.py
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 138 139 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|