fix(datasource): fail sync when all fetched items fail

This commit is contained in:
langcaiye
2026-06-04 16:16:05 +08:00
committed by lyingbug
parent 4369d156e1
commit ba8c96d83a
5 changed files with 268 additions and 28 deletions
+6
View File
@@ -79,6 +79,9 @@ type DataSourceRepository interface {
// Update updates an existing data source
Update(ctx context.Context, ds *types.DataSource) error
// UpdateSyncState updates only fields produced by a sync run.
UpdateSyncState(ctx context.Context, ds *types.DataSource) error
// Delete performs a soft delete
Delete(ctx context.Context, id string) error
@@ -107,6 +110,9 @@ type SyncLogRepository interface {
// Update updates an existing sync log entry
Update(ctx context.Context, log *types.SyncLog) error
// UpdateResult updates only fields produced by a sync run.
UpdateResult(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