refactor: move models to their own package to use the same as in the importer

This commit is contained in:
Patryk Hegenberg 2025-09-24 22:57:37 +02:00
parent 553a85562b
commit 9aa1b7384d
14 changed files with 170 additions and 152 deletions

View file

@ -8,6 +8,7 @@ import (
"strings"
"sync"
"time"
"tixel_watch/models"
)
type ExportManager struct {
@ -144,7 +145,7 @@ func (em *ExportManager) exportBatch(ctx context.Context) {
}
}
func (em *ExportManager) exportWithRetry(ctx context.Context, name string, exporter ExporterInterface, entries []LogEntry) error {
func (em *ExportManager) exportWithRetry(ctx context.Context, name string, exporter ExporterInterface, entries []models.LogMessage) error {
var lastErr error
for attempt := 0; attempt <= em.config.RetryAttempts; attempt++ {