Skip to content

Commit

Permalink
Prechecked notifications (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
IhostVlad authored Jan 18, 2022
1 parent 87b17e0 commit cbe247e
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@ export const broadcaster = async (
continue
}
promises.push(
runtime.invokeBuildAsync(
createEventSubscriberNotification(eventSubscriber, event)
)
(async () => {
let isAlreadyBuilding = false
try {
isAlreadyBuilding = !!(runtime as any).eventSubscriber.status({
eventSubscriber,
includeRuntimeStatus: true,
}).isAlive
} catch (e) {}
if (!isAlreadyBuilding) {
await runtime.invokeBuildAsync(
createEventSubscriberNotification(eventSubscriber, event)
)
}
})()
)
}

Expand Down

0 comments on commit cbe247e

Please sign in to comment.