fix(datasource): enhance error handling in ProcessSync method

- Improved logging for missing data sources, providing clearer warnings when a data source is not found.
- Updated sync log status to 'canceled' when a data source is deleted, ensuring accurate tracking of sync operations.
- Adjusted error handling to prevent unnecessary error returns, enhancing overall process stability.
This commit is contained in:
wizardchen
2026-03-30 15:12:00 +08:00
committed by lyingbug
parent 36dac0120a
commit 53bd412cf6
3 changed files with 35 additions and 3 deletions
+3
View File
@@ -95,6 +95,9 @@ type SyncLogRepository interface {
// Update updates an existing sync log entry
Update(ctx context.Context, log *types.SyncLog) error
// CancelPendingByDataSource marks all non-terminal sync logs for a data source as canceled.
CancelPendingByDataSource(ctx context.Context, dsID string) error
// CleanupOldLogs deletes sync logs older than the retention period
CleanupOldLogs(ctx context.Context, retentionDays int) error
}