This commit is contained in:
alex.sharov 2023-04-19 12:46:16 +07:00
parent b91640b1bf
commit 132cc8854f
2 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,6 @@ func (q *QueueWithRetry) ReTry(t *TxTask) {
// Next - blocks until new task available // Next - blocks until new task available
func (q *QueueWithRetry) Next(ctx context.Context) (*TxTask, bool) { func (q *QueueWithRetry) Next(ctx context.Context) (*TxTask, bool) {
log.Warn("[dbg] before next", "newTasks", q.NewTasksLen(), "retires", q.RetriesLen())
task, ok := q.popNoWait() task, ok := q.popNoWait()
if ok { if ok {
return task, true return task, true
@ -331,7 +330,7 @@ func (q *ResultsQueue) Drain(ctx context.Context) error {
q.Lock() q.Lock()
msg := []string{} msg := []string{}
for _, t := range *(q.results) { for _, t := range *(q.results) {
if t.TxNum > 9299153 { if t.TxNum > 9300_000 {
msg = append(msg, fmt.Sprintf("%d", t.TxNum)) msg = append(msg, fmt.Sprintf("%d", t.TxNum))
} }
} }

View File

@ -104,6 +104,9 @@ func (rw *Worker) Run() error {
if err := rw.resultCh.Add(rw.ctx, txTask); err != nil { if err := rw.resultCh.Add(rw.ctx, txTask); err != nil {
return err return err
} }
if txTask.TxNum > 9300_000 {
log.Warn("[dbg] before next", "newTasks", rw.in.NewTasksLen(), "retires", rw.in.RetriesLen())
}
} }
return nil return nil
} }