Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions service/matching/tasklist/task_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
}

func (tr *taskReader) getTasksPump() {
updateAckTimer := time.NewTimer(tr.config.UpdateAckInterval())
updateAckTimer := tr.timeSource.NewTimer(tr.config.UpdateAckInterval())
defer updateAckTimer.Stop()
getTasksPumpLoop:
for {
Expand Down Expand Up @@ -235,7 +235,7 @@
// There maybe more tasks. We yield now, but signal pump to check again later.
tr.Signal()
}
case <-updateAckTimer.C:
case <-updateAckTimer.Chan():

Check warning on line 238 in service/matching/tasklist/task_reader.go

View check run for this annotation

Codecov / codecov/patch

service/matching/tasklist/task_reader.go#L238

Added line #L238 was not covered by tests
{
ackLevel := tr.taskAckManager.GetAckLevel()
if size, err := tr.db.GetTaskListSize(ackLevel); err == nil {
Expand All @@ -248,7 +248,7 @@
// keep going as saving ack is not critical
}
tr.Signal() // periodically signal pump to check persistence for tasks
updateAckTimer = time.NewTimer(tr.config.UpdateAckInterval())
updateAckTimer.Reset(tr.config.UpdateAckInterval())

Check warning on line 251 in service/matching/tasklist/task_reader.go

View check run for this annotation

Codecov / codecov/patch

service/matching/tasklist/task_reader.go#L251

Added line #L251 was not covered by tests
}
}
tr.scope.UpdateGauge(metrics.TaskBacklogPerTaskListGauge, float64(tr.taskAckManager.GetBacklogCount()))
Expand Down
Loading