mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 18:07:22 +01:00
fixes for fixes
This commit is contained in:
parent
6e3ff34522
commit
8284c3c159
1 changed files with 4 additions and 4 deletions
|
|
@ -76,12 +76,12 @@ public class MainFileCleanupService : IHostedService
|
|||
isColdStorage: false, deleteFromDb: !useColdStorage,
|
||||
dbContext, ct);
|
||||
|
||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotalSize, finalRemainingHotFiles.Sum(f => f.Length));
|
||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotal, finalRemainingHotFiles.Count);
|
||||
|
||||
CleanUpStuckUploads(dbContext);
|
||||
|
||||
await dbContext.SaveChangesAsync(ct).ConfigureAwait(false);
|
||||
|
||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotalSize, finalRemainingHotFiles.Sum(f => { try { return f.Length; } catch { return 0; } }));
|
||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotal, finalRemainingHotFiles.Count);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -143,7 +143,7 @@ public class MainFileCleanupService : IHostedService
|
|||
dbContext.Entry(f).State = EntityState.Deleted;
|
||||
}
|
||||
|
||||
return files;
|
||||
return allLocalFiles;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue