Skip to content

Commit

Permalink
fix: use all intermediate keys in discard name, and increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ghivert committed Aug 2, 2024
1 parent 7393198 commit 0a3e7b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions apps/backend/src/backend/gleam/type_search.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ pub fn add(searches: TypeSearch, kind: Kind, id: Int) {
/// have to extract all intermediate next nodes, because _ can be anything.
fn extract_all_keys(keys: List(Keys)) -> List(Keys) {
use key <- list.flat_map(keys)
case key.next {
option.Some(_) -> [key, ..extract_all_keys(dict.values(key.keys))]
option.None -> extract_all_keys(dict.values(key.keys))
}
[key, ..extract_all_keys(dict.values(key.keys))]
}

/// Get the underlying ending Keys for a Kind, associated with its local
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/backend/router.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn search(query: String, ctx: Context) {

let exact_type_searches =
option.then(ctx.type_search_subject, fn(subject) {
process.try_call(subject, type_search.Find(_, query), within: 15_000)
process.try_call(subject, type_search.Find(_, query), within: 25_000)
|> option.from_result
|> option.flatten
})
Expand Down

0 comments on commit 0a3e7b2

Please sign in to comment.