remove debugging timers
This commit is contained in:
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user