Skip to content

Commit

Permalink
Hotfix: job await
Browse files Browse the repository at this point in the history
  • Loading branch information
artufimtcev committed Nov 8, 2024
1 parent e5de9bc commit e053121
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@supernovaio/cli",
"description": "Supernova.io Command Line Interface",
"version": "1.1.2",
"version": "1.1.3",
"author": "Supernova.io",
"homepage": "https://supernova.io/",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/commands/publish-documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class PublishDocumentation extends Command {

// Get workspace -> design system –> version
const { instance, id, designSystem } = await getWritableVersion(flags)
const publishJob = await instance.documentation.publishDrafts(id, environment, {
let publishJob = await instance.documentation.publishDrafts(id, environment, {
pagePersistentIds: [],
groupPersistentIds: [],
})
Expand All @@ -100,8 +100,8 @@ export class PublishDocumentation extends Command {
// Timeout is roughly 30 minutes
for (let i = 0; i < 30 * 60; i++) {
await sleep(1000)
const updatedJob = await instance.documentation.getDocumentationBuild(designSystem.workspaceId, publishJob.id)
if (isJobStatusDone(updatedJob.status)) break
publishJob = await instance.documentation.getDocumentationBuild(designSystem.workspaceId, publishJob.id)
if (isJobStatusDone(publishJob.status)) break
}

if (publishJob.status === "Success") {
Expand Down

0 comments on commit e053121

Please sign in to comment.