From e8ef52af32d11e68272c0cbda95ffb0355946d81 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 6 Feb 2019 21:10:12 +0900 Subject: [PATCH] Better file names --- src/queue/processors/export-blocking.ts | 2 +- src/queue/processors/export-following.ts | 2 +- src/queue/processors/export-mute.ts | 2 +- src/queue/processors/export-notes.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/queue/processors/export-blocking.ts b/src/queue/processors/export-blocking.ts index 841fd2c3d..95465a5e5 100644 --- a/src/queue/processors/export-blocking.ts +++ b/src/queue/processors/export-blocking.ts @@ -80,7 +80,7 @@ export async function exportBlocking(job: bq.Job, done: any): Promise { stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = dateFormat(new Date(), 'blocking-yyyy-mm-dd-HH-MM-ss') + '.csv'; + const fileName = 'blocking-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv'; const driveFile = await addFile(user, path, fileName); logger.succ(`Exported to: ${driveFile._id}`); diff --git a/src/queue/processors/export-following.ts b/src/queue/processors/export-following.ts index ed37781c0..13ba0888f 100644 --- a/src/queue/processors/export-following.ts +++ b/src/queue/processors/export-following.ts @@ -80,7 +80,7 @@ export async function exportFollowing(job: bq.Job, done: any): Promise { stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = dateFormat(new Date(), 'following-yyyy-mm-dd-HH-MM-ss') + '.csv'; + const fileName = 'following-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv'; const driveFile = await addFile(user, path, fileName); logger.succ(`Exported to: ${driveFile._id}`); diff --git a/src/queue/processors/export-mute.ts b/src/queue/processors/export-mute.ts index efe4af6c3..8f72133cd 100644 --- a/src/queue/processors/export-mute.ts +++ b/src/queue/processors/export-mute.ts @@ -80,7 +80,7 @@ export async function exportMute(job: bq.Job, done: any): Promise { stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = dateFormat(new Date(), 'mute-yyyy-mm-dd-HH-MM-ss') + '.csv'; + const fileName = 'mute-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv'; const driveFile = await addFile(user, path, fileName); logger.succ(`Exported to: ${driveFile._id}`); diff --git a/src/queue/processors/export-notes.ts b/src/queue/processors/export-notes.ts index 52845a5a9..8b84b0272 100644 --- a/src/queue/processors/export-notes.ts +++ b/src/queue/processors/export-notes.ts @@ -100,7 +100,7 @@ export async function exportNotes(job: bq.Job, done: any): Promise { stream.end(); logger.succ(`Exported to: ${path}`); - const fileName = dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.json'; + const fileName = 'notes' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.json'; const driveFile = await addFile(user, path, fileName); logger.succ(`Exported to: ${driveFile._id}`);