Class: Job

Job

The class representing a job entity.


new Job(impl)

Parameters:
Name Type Description
impl JobImpl

An object that implements job data storage and server requests.

Members


<readonly> assemblyId :string

The ID of the assembly the job is working on. Only for jobs that creates new assembly.

Type:
  • string

<readonly> authorId :string

Job creator ID. Use Client.getUser() to obtain detailed creator information.

Type:
  • string

<readonly> createdAt :string

Job creation time (UTC) in the format specified in ISO 8601.

Type:
  • string

<readonly> data :Object

Raw job data received from the server.

Type:
  • Object

<readonly> done :boolean

true if job is done or failed. See status for more details.

Type:
  • boolean

<readonly> fileId :string

The ID of the file the job is working on. Only for jobs that extracts file properties or geometry data.

Type:
  • string

<readonly> id :string

Unique job ID.

Type:
  • string

<readonly> lastUpdate :string

Job last update (UTC) time in the format specified in ISO 8601.

Type:
  • string

<readonly> outputFormat :string

The type of data to convert to. Can be properties or geomerty.

Type:
  • string

<readonly> startedAt :string

Job starting time (UTC) in the format specified in ISO 8601.

Type:
  • string

<readonly> status :string

Job status. Can be waiting, inprogress, done or failed.

Type:
  • string

<readonly> statusMessage :string

Job status description message.

Type:
  • string

Methods


<async> checkout()

Refresh job data.

Returns:
Type
Promise.<Job>

<async> delete()

Remove a job from the server job list. The method does not delete or stop jobs that are already being executed.

Returns:
  • Returns the raw data of a deleted job.
Type
Promise.<Object>

<async> update(data)

Update job data on the server. Only admins can update job data.

Parameters:
Name Type Description
data Object

Raw job data.

Returns:
Type
Promise.<Job>

<async> waitForDone( [params])

Wait until job is done. Job is done when it changes to done or failed status.

Parameters:
Name Type Argument Description
params Object <optional>

An object containing waiting parameters.

Properties
Name Type Argument Description
timeout Number <optional>

The time, in milliseconds that the function should wait job. If jobs is not done during this time, the TimeoutError exception will be thrown.

interval Number <optional>

The time, in milliseconds, the function should delay in between checking job status.

signal AbortSignal <optional>

An AbortController signal object instance, which can be used to abort waiting as desired.

Returns:
Type
Promise.<Job>