We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 298c43f commit cb9bae5Copy full SHA for cb9bae5
task/processor/processor.go
@@ -154,15 +154,22 @@ func (r *processor) run() {
154
continue
155
}
156
deviceTasks := []*task.Task{}
157
+ processTaskIDs := []common.Hash{}
158
+ i := uint64(0)
159
for _, t := range deviceTaskM {
160
+ if i >= batch {
161
+ break
162
+ }
163
+ i++
164
deviceTasks = append(deviceTasks, t)
165
+ processTaskIDs = append(processTaskIDs, t.ID)
166
167
168
err = r.process(deviceTasks, c, pid)
169
if err != nil {
170
slog.Error("failed to process task", "error", err)
171
- if err := r.db.ProcessTasks(taskIDs, err); err != nil {
172
+ if err := r.db.ProcessTasks(processTaskIDs, err); err != nil {
173
slog.Error("failed to process db tasks", "error", err)
174
175
0 commit comments