Added a little bit of logging

This commit is contained in:
Pitu 2017-10-04 02:46:31 -03:00
parent 149742ab61
commit 09a5c6bf1e
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ albumsController.generateZip = async (req, res, next) => {
.generateNodeStream({ type: 'nodebuffer', streamFiles: true })
.pipe(fs.createWriteStream(zipPath))
.on('finish', async () => {
console.log(`Generated zip for album identifier: ${identifier}`);
await db.table('albums')
.where('id', album.id)
.update({ zipGeneratedAt: Math.floor(Date.now() / 1000) });