Class providing various useful (static) functions for handling jobs.

Constructors

Methods

  • Return true if the slurm config exceeds the threshold of the slurm ceiling.

    Parameters

    • i: string

      Slurm field that a and b are associated with

    • a: string

      Storage or projected time for this job from the slurm ceiling

    • b: string

      Storage or projected time for this job for this job

    Returns boolean

    • If the slurm config exceeds the threshold of the slurm ceiling

    Static

  • Get the total slurm usage of the indicated user

    Parameters

    • userId: string
    • format: boolean = false

      Whether or not the cputume, memory, memoryusage, and walltime are already formatted

    Returns Promise<Record<string, string | number>>

    • Total slurm usage of the indicated user

    Static

    Async

  • Turns the passed amount of storage into the most convenient unit.

    Parameters

    • i: number

      Amount of storage in kb

    Returns string

    • Storage in most convenient unit (kb, mb, gb, tb, pb, eb)

    Static

  • Turns passed seconds time into days-hours:minutes:seconds format

    Parameters

    • seconds: number

      Time in seconds

    Returns string

    time - Passed seconds time converted to days-hours:minutes:seconds format.

    Static

  • Turns the passed time into a string specifying each unit

    Parameters

    • seconds_in: number

      Time in seconds

    Returns string

    • Passed time converted into dayds, hours, minutes, seconds format

    Static

  • Turns the passed amount of storage into kb

    Parameters

    • i: string

      Amount of storage in original unit

    Returns number

    • Storage in kb

    Static

  • Turns passed days-hours:minutes:seconds time into seconds format

    Parameters

    • raw: string

      Time in days-hours:minutes:seconds format.

    Returns number

    • Passed days-hours:minutes:seconds time converted to seconds.

    Static

  • Turns the passed time into seconds

    Parameters

    • time: number

      Time in specified unit

    • unit: string

      Unit the passed time is in

    Returns number

    • Passed time converted into seconds

    Static

  • Ensure this job has valid input data and slurm config rules

    Parameters

    • job: Job

      This job

    Returns void

    Static

    Throws

    • DataFolder must have a valid path, the job must have upload data, and there must be an executable folder in the maintainerConfig
  • Ensure the job has all the necessary input parameters

    Parameters

    • job: Job

      This job

    • paramRules: Record<string, unknown>

      Parameter rules for this job

    Returns void

    Static

    Throws

    Job must have a complete parameter list

  • Set the slurm rules for this job, and ensure that those rules don't exceed the default slurm ceiling

    Parameters

    • job: Job

      This job

    • slurmInputRules: slurmInputRules

      Slurm input rules associated with this job

    Returns void

    Static

    Throws

    • Slurm input rules associated with this job must not exceed the default slurm ceiling

Generated using TypeDoc