diff --git a/ee/tabby-webserver/src/service/background_job/db.rs b/ee/tabby-webserver/src/service/background_job/db.rs index 9b0f9e673789..5cccd8b91e48 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, @@ -149,7 +149,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( @@ -211,7 +211,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 c6d8f3bc128f..40b5827060f1 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, }; @@ -36,8 +36,8 @@ impl HourlyJob { ) -> tabby_schema::Result<()> { let now = Utc::now(); - if let Err(err) = DbMaintainanceJob::cron(now, context_service.clone(), db.clone()).await { - logkit::warn!("Database maintainance failed: {:?}", err); + if let Err(err) = DbMaintenanceJob::cron(now, context_service.clone(), db.clone()).await { + 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.