mirror of
https://github.com/4cuck/nitter-status.git
synced 2026-10-27 00:57:39 +00:00
template time, package version
This commit is contained in:
1 parent
e0a497b3f2
commit
fae1360b9d
4 files changed
+15
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
use crate::Result;
|
||||
use crate::ServerError;
|
||||
@@ -20,8 +21,12 @@ pub async fn instances(
|
||||
context.insert("instances", &guard.hosts);
|
||||
let time = guard.last_update.format("%Y.%m.%d %H:%M").to_string();
|
||||
context.insert("last_updated", &time);
|
||||
let start = Instant::now();
|
||||
let res = Html(template.render("instances.html.j2", &context)?).into_response();
|
||||
let end = Instant::now();
|
||||
drop(guard);
|
||||
let templating_time = end - start;
|
||||
tracing::trace!(templating_time=templating_time.as_millis());
|
||||
res
|
||||
};
|
||||
res.headers_mut().insert(
|
||||
|
||||
Reference in new issue
Block a user