Skip to content

Commit

Permalink
refactor: rename generateRepoRelateQuestion to readRepositoryRelatedQ…
Browse files Browse the repository at this point in the history
…uestions for clarity and fix typo in cache lifespan constant
  • Loading branch information
Sma1lboy committed Jan 28, 2025
1 parent 343c1b4 commit a38ffb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ee/tabby-schema/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ type Query {
userGroups: [UserGroup!]!
sourceIdAccessPolicies(sourceId: String!): SourceIdAccessPolicy!
testModelConnection(backend: ModelHealthBackend!): ModelBackendHealthInfo!
generateRepoRelateQuestion(sourceId: String!): [String!]!
readRepositoryRelatedQuestions(sourceId: String!): [String!]!
}

type RefreshTokenResponse {
Expand Down
4 changes: 2 additions & 2 deletions ee/tabby-webserver/src/service/repository/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct RepositoryServiceImpl {
relavent_dirs_questions_cache: Mutex<TimedCache<String, Vec<String>>>,
}

static RELAVENT_QUESTION_CACHE_LIFESPAN: u64 = 60 * 30; // 30 minutes
static RELEVANT_QUESTION_CACHE_LIFESPAN: u64 = 60 * 30; // 30 minutes
pub fn create(
db: DbConn,
integration: Arc<dyn IntegrationService>,
Expand All @@ -46,7 +46,7 @@ pub fn create(
.map(|config| config.repositories)
.unwrap_or_default(),
relavent_dirs_questions_cache: Mutex::new(TimedCache::with_lifespan(
RELAVENT_QUESTION_CACHE_LIFESPAN,
RELEVANT_QUESTION_CACHE_LIFESPAN,
)),
})
}
Expand Down

0 comments on commit a38ffb4

Please sign in to comment.