pyslk.SubmittedJobs

pyslk.SubmittedJobs#

class pyslk.SubmittedJobs(*, submitted_jobs_raw_output: str | None = None, resources: str | Path | list[str] | list[pathlib.Path] | None = None, resource_ids: int | str | list[int] | list[str] | None = None, search_id: int | str | None = None, search_query: str | None = None, json_input_file: str | Path | None = None, recursive: bool = False, resume_on_page: int = 1, results_per_page: int = -1, end_on_page: int = -1, save_mode: bool = False)#
__init__(*, submitted_jobs_raw_output: str | None = None, resources: str | Path | list[str] | list[pathlib.Path] | None = None, resource_ids: int | str | list[int] | list[str] | None = None, search_id: int | str | None = None, search_query: str | None = None, json_input_file: str | Path | None = None, recursive: bool = False, resume_on_page: int = 1, results_per_page: int = -1, end_on_page: int = -1, save_mode: bool = False)#

Constructor which submits a verify job

Expected structure of ``:

{‘source’: ‘resources’,

‘search_id’: 659962, ‘n_max_search_results’: 1342935, ‘n_max_verify_jobs’: 27, ‘jobs’: [{‘job_id’: 206839, ‘offset’: 0, ‘limit’: 50000},

{‘job_id’: 206843, ‘offset’: 50000, ‘limit’: 50000}, {‘job_id’: 206848, ‘offset’: 100000, ‘limit’: 50000}, {‘job_id’: 206854, ‘offset’: 150000, ‘limit’: 50000}, {‘job_id’: 206864, ‘offset’: 200000, ‘limit’: 50000}, {‘job_id’: 206876, ‘offset’: 250000, ‘limit’: 50000}, {‘job_id’: 206884, ‘offset’: 300000, ‘limit’: 50000}, {‘job_id’: 206892, ‘offset’: 350000, ‘limit’: 50000}, {‘job_id’: 206896, ‘offset’: 400000, ‘limit’: 50000}, {‘job_id’: 206898, ‘offset’: 450000, ‘limit’: 50000}, {‘job_id’: 206908, ‘offset’: 500000, ‘limit’: 50000}, {‘job_id’: 206911, ‘offset’: 550000, ‘limit’: 50000}, {‘job_id’: 206916, ‘offset’: 600000, ‘limit’: 50000}, {‘job_id’: 206920, ‘offset’: 650000, ‘limit’: 50000}, {‘job_id’: 206925, ‘offset’: 700000, ‘limit’: 50000}, {‘job_id’: 206933, ‘offset’: 750000, ‘limit’: 50000}, {‘job_id’: 206942, ‘offset’: 800000, ‘limit’: 50000}, {‘job_id’: 206950, ‘offset’: 850000, ‘limit’: 50000}, {‘job_id’: 206957, ‘offset’: 900000, ‘limit’: 50000}, {‘job_id’: 206963, ‘offset’: 950000, ‘limit’: 50000}, {‘job_id’: 206965, ‘offset’: 1000000, ‘limit’: 50000}, {‘job_id’: 206978, ‘offset’: 1050000, ‘limit’: 50000}, {‘job_id’: 206983, ‘offset’: 1100000, ‘limit’: 50000}, {‘job_id’: 206988, ‘offset’: 1150000, ‘limit’: 50000}, {‘job_id’: 206993, ‘offset’: 1200000, ‘limit’: 50000}, {‘job_id’: 206999, ‘offset’: 1250000, ‘limit’: 50000}, {‘job_id’: 207006, ‘offset’: 1300000, ‘limit’: 43000}],

‘n_verify_jobs’: 27, ‘submitted_all_jobs’: True, ‘timeout’: False}

Parameters:
  • resources (str or Path or list[str] or list[Path] or None) – provide a list of resources over which the verify job should be run

  • resource_ids (str or int or list[str] or list[int] or None) – provide a list of ids of resources over which the verify job should be run

  • search_id (str or int or None) – provide a search id pointing to files over which the verify job should be run

  • search_query (str or None) – provide a search query to select files over which the verify job should be run

  • json_input_file (str or Path or None) – read a JSON file which contains payload of the verify job (admin users only)

  • recursive (bool) – iterate namespaces recursively

  • resume_on_page (int) – resume the command and start with search result page resume_on_page; internally, 1000 search results are on one ‘page’ and fetched by one request; you do not necessarily have read permissions for all of these files

  • results_per_page (int) – number of search results requested per page

  • end_on_page (int) – end with search result page end_on_page; internally, 1000 search results are on one ‘page’ and fetched by one request; you do not necessarily have read permissions for all of these files

  • save_mode (bool) – save mode suggested to be used in times of many timeouts; please do not regularly use this parameter; start one verify job per page of search results instead of one verify job for 50 pages of search results

Methods

__init__(*[, submitted_jobs_raw_output, ...])

Constructor which submits a verify job

are_completed_details()

are_completed_short()

are_finished_details()

are_finished_short()

are_successful_details()

are_successful_short()

extract_job_ids(jobs)

finished_successfully()

get_job_ids()

get_job_information(job_id)

get_restart_information()

get_search_id()

get_search_query()

get_source()

had_timeout()

has_restart_information()

merge(other)

missing_restart_information()

check whether fields are missing in the available restart information

needs_restart()

submit([force_save_mode])

submit jobs; fresh start of all jobs and resume interrupted submission

Attributes

optional_keys

required_keys

required_restart_keys