Skip to content

Commit

Permalink
update sleep 10s between retrievals (#4)
Browse files Browse the repository at this point in the history
* update sleep 10s between retrievals

* const
  • Loading branch information
juliangruber authored Jun 5, 2023
1 parent b9ecd58 commit a6dd7b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/spark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* global Zinnia */

const sleep = dt => new Promise(resolve => setTimeout(resolve, dt))
const DELAY_BETWEEN_RETRIEVALS = 10_000

// Create activity events when we bacome operational or fail, but only once
export class ActivityState {
Expand Down Expand Up @@ -135,7 +136,7 @@ export default class Spark {
this.#activity.onError()
console.error(err)
}
await sleep(1_000)
await sleep(DELAY_BETWEEN_RETRIEVALS)
}
}
}

0 comments on commit a6dd7b2

Please sign in to comment.