зеркало из https://github.com/Azure/git-rest-api.git
make cleanup more aggressive (#64)
* make cleanup more aggressive * fix test
This commit is contained in:
Родитель
5bd75d9167
Коммит
ff889f0b2b
|
@ -50,8 +50,8 @@ describe("RepoCleanupService", () => {
|
|||
expect(indexServiceSpy.getLeastUsedRepos).not.toHaveBeenCalled();
|
||||
diskUsageService.dataDiskUsage.next({
|
||||
total: 10_000,
|
||||
available: 4_000,
|
||||
used: 4_000,
|
||||
available: 8_000,
|
||||
used: 2_000,
|
||||
});
|
||||
expect(indexServiceSpy.getLeastUsedRepos).not.toHaveBeenCalled();
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ export class RepoCleanupService {
|
|||
.pipe(
|
||||
filter(x => {
|
||||
const freeRatio = x.available / x.total;
|
||||
return freeRatio < 0.1;
|
||||
return freeRatio < 0.5;
|
||||
}),
|
||||
exhaustMap(() => {
|
||||
const count = this.getNumberOfReposToRemove();
|
||||
|
|
Загрузка…
Ссылка в новой задаче