Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typo #3712

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading