Skip to content

Commit 7eda680

Browse files
committed
Only generate as many symlinks as we need (rather than 27 years worth)
1 parent 55e1b5d commit 7eda680

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/snapshot.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ impl<L: Deref + Clone> Snapshotter<L> where L::Target: Logger {
105105
symlink(&relative_dummy_snapshot_path, &dummy_symlink_path).unwrap();
106106
}
107107

108-
for i in 0..10_001u64 {
108+
// Number of intervals since Jan 1, 2022, a few months before RGS server was released.
109+
let symlink_count = (reference_timestamp - 1640995200) / config::SNAPSHOT_CALCULATION_INTERVAL as u64;
110+
for i in 0..symlink_count {
109111
// let's create non-dummy-symlinks
110112

111113
// first, determine which snapshot range should be referenced

0 commit comments

Comments
 (0)