timeout = 5 when syncing omnivore data to readwise

This commit is contained in:
Hongbo Wu 2023-08-10 15:23:03 +08:00
parent d4ac069503
commit fc76897df3
2 changed files with 3 additions and 3 deletions

View file

@ -145,12 +145,11 @@ export function integrationsServiceRouter() {
const synced = await integrationService.export(integration, pages)
if (!synced) {
logger.info('failed to sync pages', {
logger.error('failed to sync pages', {
pageIds,
integrationId: integration.id,
})
res.status(400).send('Failed to sync')
return
return res.status(400).send('Failed to sync')
}
}
// delete task name if completed

View file

@ -125,6 +125,7 @@ export class ReadwiseIntegration extends IntegrationService {
Authorization: `Token ${token}`,
ContentType: 'application/json',
},
timeout: 10000, // 10 seconds
}
)
return response.status === 200