1111using System . Data ;
1212using System . Diagnostics ;
1313using System . Net ;
14- using System . Runtime . InteropServices ;
1514using System . Text ;
1615using System . Text . Json ;
1716using System . Text . RegularExpressions ;
@@ -682,7 +681,7 @@ public async Task StartSyncJob(CancellationToken cancellationToken)
682681 }
683682
684683 // 加载所有文件列表
685- AliyunDriveSearchFiles ( _driveId ) ;
684+ AliyunDriveSearchFiles ( ) ;
686685
687686 // 加载备份文件夹下的所有文件夹
688687 //await FetchAllFilesAsync(_driveId, saveParentFileId, 100);
@@ -696,22 +695,24 @@ public async Task StartSyncJob(CancellationToken cancellationToken)
696695
697696 sw . Stop ( ) ;
698697 _log . LogInformation ( $ "同步作业完成,用时:{ sw . ElapsedMilliseconds } ms") ;
698+
699+ // 开始校验
700+ sw . Restart ( ) ;
701+ _log . LogInformation ( $ "同步作业结束:{ DateTime . Now : G} ") ;
702+ ChangeState ( JobState . Verifying ) ;
703+
704+ await AliyunDriveVerify ( ) ;
705+
706+ sw . Stop ( ) ;
707+ _log . LogInformation ( $ "同步作业校验完成,用时:{ sw . ElapsedMilliseconds } ms") ;
708+
699709 }
700710 catch ( Exception ex )
701711 {
702712 _log . LogError ( ex , "同步作业完成执行异常" ) ;
713+ throw ex ;
703714 }
704715
705- // 开始校验
706- sw . Restart ( ) ;
707- _log . LogInformation ( $ "同步作业结束:{ DateTime . Now : G} ") ;
708- ChangeState ( JobState . Verifying ) ;
709-
710- await AliyunDriveVerify ( ) ;
711-
712- sw . Stop ( ) ;
713- _log . LogInformation ( $ "同步作业校验完成,用时:{ sw . ElapsedMilliseconds } ms") ;
714-
715716 swAll . Stop ( ) ;
716717
717718 ProcessMessage = $ "执行完成,总用时 { swAll . ElapsedMilliseconds / 1000 } 秒";
@@ -875,7 +876,7 @@ public async Task StartRestore()
875876 _log . LogInformation ( "加载云盘存储文件列表..." ) ;
876877
877878 // 所有文件列表
878- AliyunDriveSearchFiles ( _driveId ) ;
879+ AliyunDriveSearchFiles ( ) ;
879880
880881 //await FetchAllFilesAsync(_driveId, saveParentFileId, 100);
881882
@@ -2154,7 +2155,7 @@ await Parallel.ForEachAsync(addFileKeys, options, async (item, cancellationToken
21542155 /// <param name="driveId"></param>
21552156 /// <param name="limit"></param>
21562157 /// <returns></returns>
2157- private void AliyunDriveSearchFiles ( string driveId , int limit = 100 )
2158+ private void AliyunDriveSearchFiles ( int limit = 100 )
21582159 {
21592160 try
21602161 {
0 commit comments