checkPublishStatus
checkPublishStatus(
connection,jobId,requestTimeout?): () =>Promise<StatusResult>
Defined in: checkPublishStatus.ts:44
Builds a PollingClient-compatible poll() function for a community publish job.
BackgroundOperation.FinishedAt (populated once the job reaches a terminal state) is used as
the completion signal rather than matching specific Status picklist values, since that’s a
reliable signal regardless of exact status wording. Error (populated on failure) determines
success vs. failure once finished.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to poll against.
string
The jobId returned by POST /connect/communities/{id}/publish.
requestTimeout?
Section titled “requestTimeout?”Duration = DEFAULT_PUBLISH_REQUEST_TIMEOUT
Bounds each status-check attempt. Defaults to DEFAULT_PUBLISH_REQUEST_TIMEOUT; overridable mainly so tests don’t have to wait out the real default.
Returns
Section titled “Returns”A poll() function for PollingClient.create({ poll, ... }).
() => Promise<StatusResult>
Throws
Section titled “Throws”CommunityPublishFailedError if the job reaches a terminal failure state.