Skip to content

Commit 05bcc0d

Browse files
committed
fix: 修正維護執行者的結果處理邏輯
1 parent 67caacc commit 05bcc0d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Netcorext.Auth.Authentication/Workers/Runners/MaintainRunner.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ private async Task UpdateMaintainAsync(string? ids, CancellationToken cancellati
6666
var dispatcher = scope.ServiceProvider.GetRequiredService<IDispatcher>();
6767
var result = await dispatcher.SendAsync(new GetMaintain(), cancellationToken);
6868

69-
if (result.Content.IsEmpty() || result.Code != Result.Success) return;
69+
if (result.Code != Result.Success)
70+
return;
71+
72+
if (result.Content.IsEmpty())
73+
{
74+
_cache.Remove($"{ConfigSettings.CACHE_MAINTAIN}");
75+
return;
76+
}
7077

7178
_cache.Set($"{ConfigSettings.CACHE_MAINTAIN}", result.Content, _cacheEntryOptions);
7279
}

0 commit comments

Comments
 (0)