skmap.misc.ControlS3#

class ControlS3(endpoint_url, access_key, secret_key)[source]#

Bases: object

Methods

create_empty_file

list

move_completed_tile

push_file

remove

select_slurm_tile

Seturn a slurm tile to compute if available, and move the tile in the doing folder.

select_slurm_tile(bucket_prefix, server_name, deplete_doing=True, max_attempts=100)[source]#

Seturn a slurm tile to compute if available, and move the tile in the doing folder.

Parameters:
  • bucket_prefix (str) – Bucket and prefix excluding slurm_tiles.

  • server_name (str) – Server name used to define the name in the doing folder.

  • deplete_doing (bool) – If True it does also consider the doing in case todo is empty.

  • max_attempts (int) – To avoid infinite while loops.

Return type:

Tuple[bool, Optional[str]]

Returns:

A tuple with convention available, tile where if a tile is available available is True and tile is the tile string, otherwise available is False and tile is None.