-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: deps upgrade & cargo clippy #10
Conversation
@@ -112,7 +113,7 @@ static HTTP_CLIENT: Lazy<reqwest_middleware::ClientWithMiddleware> = Lazy::new(| | |||
.time_to_idle(Duration::from_secs(60 * 60 * config.cache_ttl_hour)) | |||
.build(), | |||
), | |||
options: None, | |||
options: HttpCacheOptions::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None
和 default
的语义有变化么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的类型不是 Option
了
启动时报错,但不影响处理评测任务。
|
}) | ||
.catch_signals() | ||
.handle_shutdown_requests(Duration::from_secs(10)) | ||
.await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应是此处 SubsystemBuilder
的问题
怀疑是这类写法 Lines 46 to 49 in bf75034
|
换成 作为一些参考,原来的函数: tokio::spawn(async move {
handle.on_shutdown_requested().await;
trigger.trigger();
});
pub async fn on_shutdown_requested(&self) {
self.inner.cancellation_token.cancelled().await
} 但是这会导致 pub fn create_cancellation_token(&self) -> CancellationToken {
self.inner.cancellation_token.child_token()
} 最后在 let cancellation_token = handle.create_cancellation_token();
tokio::spawn(async move {
cancellation_token.cancelled().await;
// ...
}); |
No description provided.