diff --git a/ee/tabby-webserver/src/service/background_job/db.rs b/ee/tabby-webserver/src/service/background_job/db.rs index 49bb92cc9712..8f2593cfa2be 100644 --- a/ee/tabby-webserver/src/service/background_job/db.rs +++ b/ee/tabby-webserver/src/service/background_job/db.rs @@ -8,13 +8,13 @@ use tabby_schema::{context::ContextService, CoreError}; use super::helper::Job; #[derive(Debug, Serialize, Deserialize, Clone)] -pub struct DbMaintainanceJob; +pub struct DbMaintenanceJob; -impl Job for DbMaintainanceJob { - const NAME: &'static str = "db_maintainance"; +impl Job for DbMaintenanceJob { + const NAME: &'static str = "db_maintenance"; } -impl DbMaintainanceJob { +impl DbMaintenanceJob { pub async fn cron( now: DateTime, context: Arc, @@ -155,7 +155,7 @@ mod tests { .unwrap(); assert_eq!(events.len(), 1); - DbMaintainanceJob::data_retention(now, &db).await.unwrap(); + DbMaintenanceJob::data_retention(now, &db).await.unwrap(); let events = db .list_user_events( @@ -217,7 +217,7 @@ mod tests { .unwrap(); assert_eq!(events.len(), 1); - DbMaintainanceJob::data_retention(now, &db).await.unwrap(); + DbMaintenanceJob::data_retention(now, &db).await.unwrap(); let events = db .list_user_events( diff --git a/ee/tabby-webserver/src/service/background_job/hourly.rs b/ee/tabby-webserver/src/service/background_job/hourly.rs index 43ec4ec48a2f..9e0c522532b5 100644 --- a/ee/tabby-webserver/src/service/background_job/hourly.rs +++ b/ee/tabby-webserver/src/service/background_job/hourly.rs @@ -12,7 +12,7 @@ use tabby_schema::{ use super::helper::Job; use crate::service::background_job::{ - db::DbMaintainanceJob, IndexGarbageCollection, SchedulerGitJob, SchedulerGithubGitlabJob, + db::DbMaintenanceJob, IndexGarbageCollection, SchedulerGitJob, SchedulerGithubGitlabJob, SyncIntegrationJob, }; @@ -37,9 +37,9 @@ impl HourlyJob { let now = Utc::now(); let mut has_error = false; - if let Err(err) = DbMaintainanceJob::cron(now, context_service.clone(), db.clone()).await { + if let Err(err) = DbMaintenanceJob::cron(now, context_service.clone(), db.clone()).await { has_error = true; - logkit::warn!("Database maintainance failed: {:?}", err); + logkit::warn!("Database maintenance failed: {:?}", err); } if let Err(err) = diff --git a/ee/tabby-webserver/src/service/background_job/license_check.rs b/ee/tabby-webserver/src/service/background_job/license_check.rs index 2825a18ac211..8f167f5b5bd0 100644 --- a/ee/tabby-webserver/src/service/background_job/license_check.rs +++ b/ee/tabby-webserver/src/service/background_job/license_check.rs @@ -31,7 +31,7 @@ impl LicenseCheckJob { notification_service .create( NotificationRecipient::Admin, - &make_expring_message(expire_in_days), + &make_expiring_message(expire_in_days), ) .await?; } @@ -40,7 +40,7 @@ impl LicenseCheckJob { } } -fn make_expring_message(expire_in_days: i64) -> String { +fn make_expiring_message(expire_in_days: i64) -> String { format!( r#"Your license will expire in {} days.