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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user