status

compute.status(job, ownerKeystore)
compute.status({opts.startTime, opts.endTime}, ownerKeystore)

Returns the status of jobs deployed to the scheduler with information including:

  • deployTime

  • endTime

  • lastSliceNumber

  • link

  • name

  • nextSliceNumber

  • ownerAddress

  • paymentAccount

  • status

  • uuid

  • jobAddress

Arguments:
  • job (Job|string) – An instance or id of the :class`Job`.

  • opts.startTime (number) – A job start time filter in unix milliseconds. Any job older than this time will be excluded from the results.

  • opts.endTime (number) – A job end time filter in unix milliseconds. Any job newer than this time will be excluded from the results.

  • ownerKeystore (Keystore) – The keystore of the job owner.

Return type:

Status|Array<Status>

Forms

Form 1

compute.status(job, ownerKeystore);

Returns an instance of Status for a given job.

Example:

job.on('result', async (ev) => {
  const status = await compute.status(job, keystore);
  console.log('status:', status);
});

Form 2

Returns an array of Status objects for jobs started between opts.startTime and opts.endTime, inclusive.

compute.status({ startTime, endTime }, ownerKeystore);

Example:

job.on('result', async (ev) => {
  const status = await compute.status(
    { startTime: 0, endTime: Date.now() },
    keystore,
  );

  console.log('status:', status);
});