remove debugging timers

This commit is contained in:
Hongbo Wu
2024-05-20 11:26:06 +08:00
parent 8b1dc1494e
commit a3fe526c2c
2 changed files with 0 additions and 10 deletions

View File

@ -679,7 +679,6 @@ export const searchResolver = authorized<
return { errorCodes: [SearchErrorCode.QueryTooLong] }
}
log.profile('searchResolver')
const { libraryItems, count } = await searchAndCountLibraryItems(
{
from: Number(startCursor),
@ -692,7 +691,6 @@ export const searchResolver = authorized<
},
uid
)
log.profile('searchResolver')
const start =
startCursor && !isNaN(Number(startCursor)) ? Number(startCursor) : 0

View File

@ -483,9 +483,7 @@ export const functionResolvers = {
ctx.claims &&
item.uploadFileId
) {
logger.profile('uploadFiles' + item.id)
const upload = await ctx.dataLoaders.uploadFiles.load(item.uploadFileId)
logger.profile('uploadFiles' + item.id)
if (!upload || !upload.fileName) {
return undefined
}
@ -518,9 +516,7 @@ export const functionResolvers = {
) {
if (item.labels) return item.labels
logger.profile('labels' + item.id)
const labels = await ctx.dataLoaders.labels.load(item.id)
logger.profile('labels' + item.id)
return labels
},
async recommendations(
@ -533,11 +529,9 @@ export const functionResolvers = {
) {
if (item.recommendations) return item.recommendations
logger.profile('recommendations' + item.id)
const recommendations = await ctx.dataLoaders.recommendations.load(
item.id
)
logger.profile('recommendations' + item.id)
return recommendations.map(recommandationDataToRecommendation)
},
async aiSummary(item: SearchItem, _: unknown, ctx: WithDataSourcesContext) {
@ -559,9 +553,7 @@ export const functionResolvers = {
) {
if (item.highlights) return item.highlights
logger.profile('highlights' + item.id)
const highlights = await ctx.dataLoaders.highlights.load(item.id)
logger.profile('highlights' + item.id)
return highlights.map(highlightDataToHighlight)
},
...readingProgressHandlers,