Skip to content

Commit 8045bf6

Browse files
committed
Don't run site if we can't populate the commit cache
1 parent dc30947 commit 8045bf6

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

site/src/load.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ impl MasterCommitCache {
116116
updated: Instant::now(),
117117
})
118118
}
119-
120-
/// Returns an empty cache that is marked as stale
121-
pub fn empty() -> Self {
122-
Self {
123-
commits: Vec::new(),
124-
updated: Instant::now() - std::time::Duration::from_secs(2 * 60),
125-
}
126-
}
127119
}
128120

129121
/// Site context object that contains global data
@@ -188,9 +180,7 @@ impl SiteCtxt {
188180
}
189181
};
190182

191-
let master_commits = MasterCommitCache::download()
192-
.await
193-
.unwrap_or(MasterCommitCache::empty()); // still run the site if we can't get the commits right now
183+
let master_commits = MasterCommitCache::download().await?;
194184

195185
Ok(Self {
196186
config,

0 commit comments

Comments
 (0)