scheduler

JobScheduler classes

class scheduler.JobScheduler(source: FileRetriever)[source]

Base class for scheduling a merge job

Initialize the JobScheduler with a source of files to merge.

Parameters:

source – FileRetriever object to provide input files

get_chunks() None[source]

Run the FileRetriever and get the list of chunks.

abstract run() None[source]

Run the job scheduler.

class scheduler.JustinScheduler(source: FileRetriever)[source]

Job scheduler for JustIN merge jobs

Initialize the JustinScheduler with a source of files to merge.

Parameters:

source – FileRetriever object to provide input files

get_chunks() None[source]

Run the FileRetriever and get the list of chunks.

get_cmd(tier: int, site: str | None = None) str[source]

Get the command to run for a given tier and site.

Parameters:
  • tier – Pass number (1 or 2)

  • site – Optional site name

Returns:

Command string

json_name(tier: int, site: str | None = None) str[source]

Get the name of the next JSON config file for a given pass and site.

Parameters:
  • tier – Pass number (1 or 2)

  • site – Optional site name

Returns:

Name of the JSON file

run() None[source]

Run the JustIN job scheduler.

Returns:

None

upload_cfg() None[source]

Make a tarball of the configuration files and upload them to cvmfs

Returns:

Path to the uploaded configuration directory

class scheduler.LocalScheduler(source: FileRetriever)[source]

Job scheduler for local merge jobs

Initialize the LocalScheduler with a source of files to merge.

Parameters:

source – FileRetriever object to provide input files

get_chunks() None[source]

Run the FileRetriever and get the list of chunks.

json_name(tier: int) str[source]

Get the name of the next JSON config file for a given pass and site.

Parameters:
  • tier – Pass number (1 or 2)

  • site – Optional site name

Returns:

Name of the JSON file

run() None[source]

Run the job scheduler.