Skip to content

Commit

Permalink
chore: fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Zhang <[email protected]>
  • Loading branch information
zwpaper committed Jan 16, 2025
1 parent ba854da commit 8e533ee
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 @@ -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(
Expand Down Expand Up @@ -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(
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 @@ -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);

Check warning on line 40 in ee/tabby-webserver/src/service/background_job/hourly.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/background_job/hourly.rs#L39-L40

Added lines #L39 - L40 were not covered by tests
}

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),

Check warning on line 34 in ee/tabby-webserver/src/service/background_job/license_check.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/background_job/license_check.rs#L34

Added line #L34 was not covered by tests
)
.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 {

Check warning on line 43 in ee/tabby-webserver/src/service/background_job/license_check.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/background_job/license_check.rs#L43

Added line #L43 was not covered by tests
format!(
r#"Your license will expire in {} days.
Expand Down

0 comments on commit 8e533ee

Please sign in to comment.