From 8e81926076679eafe4d994e1c21af6706401b5f2 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 21 Jan 2018 17:26:16 -0800 Subject: [PATCH] fix bug in db cleanup --- routes/_utils/database/cleanupTimelines.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/_utils/database/cleanupTimelines.js b/routes/_utils/database/cleanupTimelines.js index 746c421..d051513 100644 --- a/routes/_utils/database/cleanupTimelines.js +++ b/routes/_utils/database/cleanupTimelines.js @@ -47,7 +47,8 @@ export const cleanupOldStatuses = debounce(async () => { if (type !== 'timeline') { continue } - await cleanup(instanceName, dbName) + let timeline = dbName.split('_').slice(-1) + await cleanup(instanceName, timeline) } } if (process.env.NODE_ENV !== 'production') {