11
11
using System . Data ;
12
12
using System . Diagnostics ;
13
13
using System . Net ;
14
- using System . Runtime . InteropServices ;
15
14
using System . Text ;
16
15
using System . Text . Json ;
17
16
using System . Text . RegularExpressions ;
@@ -682,7 +681,7 @@ public async Task StartSyncJob(CancellationToken cancellationToken)
682
681
}
683
682
684
683
// 加载所有文件列表
685
- AliyunDriveSearchFiles ( _driveId ) ;
684
+ AliyunDriveSearchFiles ( ) ;
686
685
687
686
// 加载备份文件夹下的所有文件夹
688
687
//await FetchAllFilesAsync(_driveId, saveParentFileId, 100);
@@ -696,22 +695,24 @@ public async Task StartSyncJob(CancellationToken cancellationToken)
696
695
697
696
sw . Stop ( ) ;
698
697
_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
+
699
709
}
700
710
catch ( Exception ex )
701
711
{
702
712
_log . LogError ( ex , "同步作业完成执行异常" ) ;
713
+ throw ex ;
703
714
}
704
715
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
-
715
716
swAll . Stop ( ) ;
716
717
717
718
ProcessMessage = $ "执行完成,总用时 { swAll . ElapsedMilliseconds / 1000 } 秒";
@@ -875,7 +876,7 @@ public async Task StartRestore()
875
876
_log . LogInformation ( "加载云盘存储文件列表..." ) ;
876
877
877
878
// 所有文件列表
878
- AliyunDriveSearchFiles ( _driveId ) ;
879
+ AliyunDriveSearchFiles ( ) ;
879
880
880
881
//await FetchAllFilesAsync(_driveId, saveParentFileId, 100);
881
882
@@ -2154,7 +2155,7 @@ await Parallel.ForEachAsync(addFileKeys, options, async (item, cancellationToken
2154
2155
/// <param name="driveId"></param>
2155
2156
/// <param name="limit"></param>
2156
2157
/// <returns></returns>
2157
- private void AliyunDriveSearchFiles ( string driveId , int limit = 100 )
2158
+ private void AliyunDriveSearchFiles ( int limit = 100 )
2158
2159
{
2159
2160
try
2160
2161
{
0 commit comments