1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-14 12:12:21 +00:00

Set temp packages ttl to 1h (#953)

This leaves only 3 last temp packages

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2024-04-02 11:46:40 +03:00 committed by GitHub
parent f7907bdd58
commit 8390d887d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -930,7 +930,7 @@ void ArchiveManager::alarm() {
}
void ArchiveManager::run_gc(UnixTime mc_ts, UnixTime gc_ts, UnixTime archive_ttl) {
auto p = get_temp_package_id_by_unixtime(std::max(gc_ts, mc_ts - TEMP_PACKAGES_TTL));
auto p = get_temp_package_id_by_unixtime(mc_ts - TEMP_PACKAGES_TTL);
std::vector<PackageId> vec;
for (auto &x : temp_files_) {
if (x.first < p) {

View file

@ -226,7 +226,7 @@ class ArchiveManager : public td::actor::Actor {
void update_permanent_slices();
static const td::uint32 TEMP_PACKAGES_TTL = 86400 * 7;
static const td::uint32 TEMP_PACKAGES_TTL = 3600;
};
} // namespace validator