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