***

title: "SubscribableJob"
generated: true
---------------

<GenerationInfo sourceFile="packages/core/src/job-queue/subscribable-job.ts" sourceLine="59" packageName="@vendure/core" />

This is a type of Job object that allows you to subscribe to updates to the Job. It is returned
by the [JobQueue](/current/core/reference/typescript-api/job-queue/#jobqueue)'s `add()` method. Note that the subscription capability is only supported
if the [JobQueueStrategy](/current/core/reference/typescript-api/job-queue/job-queue-strategy#jobqueuestrategy) implements the [InspectableJobQueueStrategy](/current/core/reference/typescript-api/job-queue/inspectable-job-queue-strategy#inspectablejobqueuestrategy) interface (e.g.
the [SqlJobQueueStrategy](/current/core/reference/typescript-api/job-queue/sql-job-queue-strategy#sqljobqueuestrategy) does support this).

```ts title="Signature"
class SubscribableJob<T extends JobData<T> = any> extends Job<T> {
    constructor(job: Job<T>, jobQueueStrategy: JobQueueStrategy)
    updates(options?: JobUpdateOptions) => Observable<JobUpdate<T>>;
}
```

* Extends: [`Job`](/current/core/reference/typescript-api/job-queue/job#job)`<T>`

<div className="members-wrapper">

### updates

\<MemberInfo kind="method" type={`(options?: <a href='/current/core/reference/typescript-api/job-queue/types#jobupdateoptions'>JobUpdateOptions</a>) => Observable<<a href='/current/core/reference/typescript-api/job-queue/types#jobupdate'>JobUpdate</a><T>>`}   />

Returns an Observable stream of updates to the Job. Works by polling the current JobQueueStrategy's `findOne()` method
to obtain updates. If the updates are not subscribed to, then no polling occurs.

Polling interval, timeout and other options may be configured with an options arguments [JobUpdateOptions](/current/core/reference/typescript-api/job-queue/types#jobupdateoptions).

</div>
