From d25bd876cb0c9d84bde87abab22224410aa7cc4e 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 841fd2c3da..95465a5e51 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 ed37781c0f..13ba0888f0 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 efe4af6c38..8f72133cd6 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 52845a5a9c..8b84b02722 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}`);