fixes for fixes
This commit is contained in:
@@ -76,12 +76,12 @@ public class MainFileCleanupService : IHostedService
|
|||||||
isColdStorage: false, deleteFromDb: !useColdStorage,
|
isColdStorage: false, deleteFromDb: !useColdStorage,
|
||||||
dbContext, ct);
|
dbContext, ct);
|
||||||
|
|
||||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotalSize, finalRemainingHotFiles.Sum(f => f.Length));
|
|
||||||
_metrics.SetGaugeTo(MetricsAPI.GaugeFilesTotal, finalRemainingHotFiles.Count);
|
|
||||||
|
|
||||||
CleanUpStuckUploads(dbContext);
|
CleanUpStuckUploads(dbContext);
|
||||||
|
|
||||||
await dbContext.SaveChangesAsync(ct).ConfigureAwait(false);
|
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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -143,7 +143,7 @@ public class MainFileCleanupService : IHostedService
|
|||||||
dbContext.Entry(f).State = EntityState.Deleted;
|
dbContext.Entry(f).State = EntityState.Deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
return files;
|
return allLocalFiles;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user