Skip to content

Commit d4bbc5b

Browse files
committed
emit activity based on reporting not fetching
1 parent 92dbe33 commit d4bbc5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/spark.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,9 @@ export default class Spark {
113113
try {
114114
await this.fetchCAR(url, stats)
115115
success = true
116-
this.#activity.onSuccess()
117116
} catch (err) {
118117
console.error(`Failed to fetch ${url}`)
119118
console.error(err)
120-
this.#activity.onError()
121119
}
122120

123121
await this.submitRetrieval(retrieval.id, { success, ...stats })
@@ -129,6 +127,7 @@ export default class Spark {
129127
while (true) {
130128
try {
131129
await this.nextRetrieval()
130+
this.#activity.onSuccess()
132131
} catch (err) {
133132
this.#activity.onError()
134133
console.error(err)

0 commit comments

Comments
 (0)