Skip to content

Commit

Permalink
fix: report healthy state earlier (#36)
Browse files Browse the repository at this point in the history
Report the healthy state as soon as we can fetch round details from
spark-api. This way Station Desktop becomes "online" faster on startup
or after network disconnect.

Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos authored Oct 17, 2023
1 parent eb99de4 commit 1947de7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default class Spark {
headers: { 'Content-Type': 'application/json' }
})
await assertOkResponse(res, 'Failed to fetch the current SPARK round')
this.#activity.onHealthy()
const { retrievalTasks, ...round } = await res.json()
console.log('Current SPARK round:', round)
console.log(' %s retrieval tasks', retrievalTasks.length)
Expand Down

0 comments on commit 1947de7

Please sign in to comment.