Add cursor to logs

This commit is contained in:
Jackson Harper
2024-11-02 11:05:40 +08:00
parent 37de640830
commit 7599bbaded

View File

@ -220,10 +220,10 @@ export const exportJob = async (jobData: ExportJobData) => {
// Pipe the archiver output to the write stream
archive.pipe(writeStream)
let cursor = 0
try {
// fetch data from the database
const batchSize = 20
let cursor = 0
let hasNext = false
do {
const items = await searchLibraryItems(
@ -266,7 +266,7 @@ export const exportJob = async (jobData: ExportJobData) => {
writeStream.on('error', reject)
})
logger.info('export completed', {
logger.info(`export completed, exported ${cursor} items`, {
userId,
})