---
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 <DocsLink href="/reference/typescript-api/job-queue/#jobqueue">JobQueue</DocsLink>'s `add()` method. Note that the subscription capability is only supported
if the <DocsLink href="/reference/typescript-api/job-queue/job-queue-strategy#jobqueuestrategy">JobQueueStrategy</DocsLink> implements the <DocsLink href="/reference/typescript-api/job-queue/inspectable-job-queue-strategy#inspectablejobqueuestrategy">InspectableJobQueueStrategy</DocsLink> interface (e.g.
the <DocsLink href="/reference/typescript-api/job-queue/sql-job-queue-strategy#sqljobqueuestrategy">SqlJobQueueStrategy</DocsLink> 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: <DocsLink href="/reference/typescript-api/job-queue/job#job">`Job`</DocsLink><T>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(job: <a href='/reference/typescript-api/job-queue/job#job'>Job</a><T>, jobQueueStrategy: <a href='/reference/typescript-api/job-queue/job-queue-strategy#jobqueuestrategy'>JobQueueStrategy</a>) => SubscribableJob`}   />


### updates

<MemberInfo kind="method" type={`(options?: <a href='/reference/typescript-api/job-queue/types#jobupdateoptions'>JobUpdateOptions</a>) => Observable<<a href='/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 <DocsLink href="/reference/typescript-api/job-queue/types#jobupdateoptions">JobUpdateOptions</DocsLink>.


</div>
