From 885a7d2ef4b39bc3b369435b333526ced6bf7bcd Mon Sep 17 00:00:00 2001 From: masonyc Date: Fri, 13 Oct 2023 00:31:35 +1300 Subject: [PATCH] fix: format --- src/frontend/src/instance.rs | 1 + src/servers/src/heartbeat_options.rs | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/instance.rs b/src/frontend/src/instance.rs index 27ec02dc4543..17f238f3c27d 100644 --- a/src/frontend/src/instance.rs +++ b/src/frontend/src/instance.rs @@ -22,6 +22,7 @@ mod script; mod standalone; use std::collections::HashMap; use std::sync::Arc; + use api::v1::meta::Role; use async_trait::async_trait; use auth::{PermissionChecker, PermissionCheckerRef, PermissionReq}; diff --git a/src/servers/src/heartbeat_options.rs b/src/servers/src/heartbeat_options.rs index b7139755680f..d5c7c55a9f71 100644 --- a/src/servers/src/heartbeat_options.rs +++ b/src/servers/src/heartbeat_options.rs @@ -12,8 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_meta::distributed_time_constants; use std::time::Duration; + +use common_meta::distributed_time_constants; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -31,8 +32,12 @@ impl HeartbeatOptions { pub fn frontend_default() -> Self { Self { // Frontend can send heartbeat with a longer interval. - interval_millis: Duration::from_millis(distributed_time_constants::FRONTEND_HEARTBEAT_INTERVAL_MILLIS), - retry_interval_millis:Duration::from_millis(distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS), + interval_millis: Duration::from_millis( + distributed_time_constants::FRONTEND_HEARTBEAT_INTERVAL_MILLIS, + ), + retry_interval_millis: Duration::from_millis( + distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS, + ), } } } @@ -40,8 +45,12 @@ impl HeartbeatOptions { impl Default for HeartbeatOptions { fn default() -> Self { Self { - interval_millis: Duration::from_millis(distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS), - retry_interval_millis:Duration::from_millis(distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS), + interval_millis: Duration::from_millis( + distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS, + ), + retry_interval_millis: Duration::from_millis( + distributed_time_constants::HEARTBEAT_INTERVAL_MILLIS, + ), } } }