Options
All
  • Public
  • Public/Protected
  • All
Menu

APIs for monitoring the status of a job. Use these APIs to wait for a job to enter the specified status. All APIs in monitor jobs invoke z/OSMF jobs REST endpoints to obtain job status information.

export

Hierarchy

  • MonitorJobs

Index

Properties

Static Readonly DEFAULT_ATTEMPTS

DEFAULT_ATTEMPTS: number = Infinity

Default number of poll attempts to check for the specified job status.

static
memberof

MonitorJobs

Static Readonly DEFAULT_STATUS

DEFAULT_STATUS: JOB_STATUS = JOB_STATUS.OUTPUT

Default expected job status ("OUTPUT")

static
memberof

MonitorJobs

Static Readonly DEFAULT_WATCH_DELAY

DEFAULT_WATCH_DELAY: 3000 = 3000

The default amount of time (in milliseconds) to wait until the next job status poll.

static
memberof

MonitorJobs

Static Private log

log: Logger = Logger.getAppLogger()

Obtain an instance of the app logger (Brightside).

static
memberof

MonitorJobs

Methods

Static Private checkStatus

  • Checks the status of the job for the expected status (OR that the job has progressed passed the expected status).

    static
    memberof

    MonitorJobs

    Parameters

    Returns Promise<[boolean, IJob]>

    • promise to fulfill when the job status is obtained (or imperative error)

Static Private constructErrorMsg

  • Constructs the default error message (to be thrown via ImperativeError) for the monitor jobs APIs

    static
    memberof

    MonitorJobs

    Parameters

    Returns string

    • The error string to be thrown via ImperativeError

Static Private pollForStatus

Static waitForJobOutputStatus

  • Given an IJob (has jobname/jobid), waits for the status of the job to be "OUTPUT". This API will poll for the OUTPUT status once every 3 seconds indefinitely. If the polling interval/duration is NOT sufficient, use "waitForStatusCommon" to adjust.

    See JSDoc for "waitForStatusCommon" for full details on polling and other logic.

    static
    memberof

    MonitorJobs

    Parameters

    • session: AbstractSession

      a Rest client session for z/OSMF

    • job: IJob

      the z/OS job to wait for (see z/OSMF Jobs APIs for details)

    Returns Promise<IJob>

    • the promise to be fulfilled with IJob object (or rejected with an ImperativeError)

Static waitForOutputStatus

  • Given the jobname/jobid, waits for the status of the job to be "OUTPUT". This API will poll for the OUTPUT status once every 3 seconds indefinitely. If the polling interval/duration is NOT sufficient, use "waitForStatusCommon" to adjust.

    See JSDoc for "waitForStatusCommon" for full details on polling and other logic.

    static
    memberof

    MonitorJobs

    Parameters

    • session: AbstractSession

      a Rest client session for z/OSMF

    • jobname: string

      the z/OS jobname of the job to wait for output status (see z/OSMF Jobs APIs for details)

    • jobid: string

      the z/OS jobid of the job to wait for output status (see z/OSMF Jobs APIS for details)

    Returns Promise<IJob>

    • the promise to be fulfilled with IJob object (or rejected with an ImperativeError)

Static waitForStatusCommon

  • Given jobname/jobid, checks for the desired "status" (default is "OUTPUT") continuously (based on the interval and attempts specified).

    The "order" of natural job status is INPUT > ACTIVE > OUTPUT. If the requested status is earlier in the sequence than the current status of the job, then the method returns immediately (since the job will never enter the requested status) with the current status of the job.

    static
    memberof

    MonitorJobs

    Parameters

    Returns Promise<IJob>

    • the promise to be fulfilled with IJob object (or rejected with an ImperativeError)

Generated using TypeDoc