climate_ref.executor.result_handling
#
Execute diagnostics in different environments
We support running diagnostics in different environments, such as locally,
in a separate process, or in a container.
These environments are represented by climate_ref.executor.Executor classes.
The simplest executor is the LocalExecutor, which runs the diagnostic in the same process.
This is useful for local testing and debugging.
handle_execution_result(config, database, execution, result)
#
Handle the result of a diagnostic execution
This will update the diagnostic execution result with the output of the diagnostic execution. The output will be copied from the scratch directory to the executions directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
The configuration to use |
required |
database
|
Database
|
The active database session to use |
required |
execution
|
Execution
|
The diagnostic execution result DB object to update |
required |
result
|
ExecutionResult
|
The result of the diagnostic execution, either successful or failed |
required |
Source code in packages/climate-ref/src/climate_ref/executor/result_handling.py
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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |