Feat/next packages (#2646)

* fix mac build

* wip

* chore: Update the effects to get rid of bad pattern

* chore: Some small changes

* wip

* fix: Health checks don't show during race

* fix: Restart working

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Jade
2024-06-19 17:30:05 -06:00
committed by GitHub
parent da3720c7a9
commit 355452cdb3
7 changed files with 65 additions and 34 deletions

View File

@@ -154,7 +154,7 @@ export class Daemons<Manifest extends SDKManifest, Ids extends string> {
this.healthDaemons.forEach((x) =>
x.addWatcher(() => this.updateMainHealth()),
)
return {
const built = {
term: async (options?: { signal?: Signals; timeout?: number }) => {
try {
await Promise.all(this.healthDaemons.map((x) => x.term(options)))
@@ -163,6 +163,8 @@ export class Daemons<Manifest extends SDKManifest, Ids extends string> {
}
},
}
this.started(() => built.term())
return built
}
private updateMainHealth() {

View File

@@ -132,14 +132,14 @@ export class HealthDaemon {
this.effects.setHealth({
result: status,
message: health.message,
id: display,
id: this.id,
name: display,
})
} else {
this.effects.setHealth({
result: health.status,
message: health.message || "",
id: display,
id: this.id,
name: display,
})
}