Skip to content

Commit

Permalink
chore: fix typo (#3712)
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Zhang <[email protected]>
  • Loading branch information
zwpaper authored Jan 17, 2025
1 parent 9e03fe0 commit cb94a1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions ee/tabby-webserver/src/service/background_job/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Utc>,
context: Arc<dyn ContextService>,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions ee/tabby-webserver/src/service/background_job/hourly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand All @@ -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) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl LicenseCheckJob {
notification_service
.create(
NotificationRecipient::Admin,
&make_expring_message(expire_in_days),
&make_expiring_message(expire_in_days),
)
.await?;
}
Expand All @@ -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.
Expand Down

0 comments on commit cb94a1e

Please sign in to comment.