tar_commands
Prepare tar commands for task-subfolder compression/extraction.
get_tar_compression_cmd(subfolder_path, filelist_path)
¶
Prepare command to compress e.g. /path/dir
into /path/dir.tar.gz
.
Note that /path/dir.tar.gz
may already exist. In this case, it will
be overwritten.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subfolder_path |
Path
|
Absolute path to the folder to compress. |
required |
filelist_path |
Path | None
|
If set, to be used in the |
required |
expected_tarfile |
If set, it should match to the returned one. |
required |
Returns:
Type | Description |
---|---|
tuple[str, str]
|
tar command |
Source code in fractal_server/app/runner/executors/slurm_ssh/tar_commands.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
get_tar_extraction_cmd(archive_path)
¶
Prepare command to extract e.g. /path/dir.tar.gz
into /path/dir
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
archive_path |
Path
|
Absolute path to the tar.gz archive. |
required |
Returns:
Type | Description |
---|---|
tuple[Path, str]
|
Target extraction folder and tar command |
Source code in fractal_server/app/runner/executors/slurm_ssh/tar_commands.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|