feat: enable configured multitable synchronization
This commit is contained in:
@@ -2,6 +2,7 @@ package multitable
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@@ -75,7 +76,9 @@ func (w *Worker) claim() []model.MultiTableOutbox {
|
||||
func (w *Worker) retry(event model.MultiTableOutbox, cause error) {
|
||||
status := "pending"
|
||||
availableAt := time.Now().Add(backoff(event.Attempts))
|
||||
if event.Attempts >= w.config.MaxAttempts {
|
||||
// A missing source row cannot be repaired by retrying. This commonly occurs
|
||||
// for audit events created before a source record was deleted.
|
||||
if errors.Is(cause, gorm.ErrRecordNotFound) || event.Attempts >= w.config.MaxAttempts {
|
||||
status = "failed"
|
||||
}
|
||||
message := truncate(cause.Error(), 1024)
|
||||
|
||||
Reference in New Issue
Block a user