From 84a915854ce73dadbed40fd13cea6044e7776ae9 Mon Sep 17 00:00:00 2001 From: KunoiSayami <46131041+KunoiSayami@users.noreply.github.com> Date: Thu, 22 Jul 2021 12:14:04 +0800 Subject: feat(test): Add compile time wait commit time option --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 46f088f..f960422 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,11 @@ impl IOModule { if let Err(ref e) = ret { eprintln!("{:?}", e); + #[cfg(test)] + eprintln!( + "If database locked error occurs frequently, \ + please use environment DISK_WAIT_TIME to specify longer time." + ); log::error!("{:?}", e) } @@ -89,7 +94,10 @@ impl IOModule { writeln!( &mut self.writer, "Set-Cookie: cgit_auth={}; Domain={}; Max-Age={}; HttpOnly{}", - cookie_value, domain, cfg.cookie_ttl * 10, cookie_suffix + cookie_value, + domain, + cfg.cookie_ttl * 10, + cookie_suffix )?; } else { writeln!(&mut self.writer, "Status: 403 Forbidden")?; -- cgit v1.3.1