Skip to content

Commit 6aa09b5

Browse files
committed
async collect
1 parent 511e0b8 commit 6aa09b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ func (w *Worker) Run() {
167167

168168
if time.Since(w.lastCollect) >= time.Hour {
169169
w.lastCollect = time.Now()
170-
w.runCollect(ctx)
171-
w.summaryProjectUsage(ctx)
170+
go func() {
171+
w.runCollect(ctx)
172+
w.summaryProjectUsage(ctx)
173+
}()
172174
}
173175

174176
running := atomic.LoadUint32(&w.statusRunning)

0 commit comments

Comments
 (0)