Skip to content

Commit 97dcd8c

Browse files
committed
fix: GetTaskIndexFunc
1 parent 2f2434f commit 97dcd8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aggregator/pkg/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ func (agg *Aggregator) ServerRunning(_ *struct{}, reply *int64) error {
106106
return nil
107107
}
108108

109-
func (agg *Aggregator) GetTaskIndex(batchIdentifierHash [32]byte) (uint32, error) {
109+
func GetTaskIndexFunc(agg *Aggregator, batchIdentifierHash [32]byte) func() (uint32, error) {
110110
getTaskIndex_func := func() (uint32, error) {
111111
agg.taskMutex.Lock()
112112
taskIndex, ok := agg.batchesIdxByIdentifierHash[batchIdentifierHash]
113113
agg.taskMutex.Unlock()
114114
if !ok {
115-
return taskIndex, fmt.Errorf("Task not found in the internal map")
115+
return taskIndex, fmt.Errorf("task not found in the internal map")
116116
} else {
117117
return taskIndex, nil
118118
}

0 commit comments

Comments
 (0)