From d000b9e7cd8316855be7d5d4f1ab457cfaf554c9 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Fri, 4 May 2018 15:17:00 +0900
Subject: [PATCH] :v:

---
 cli/clean-drive.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cli/clean-drive.js b/cli/clean-drive.js
index 1d61c5ccc3..68d849fa49 100644
--- a/cli/clean-drive.js
+++ b/cli/clean-drive.js
@@ -6,6 +6,10 @@ const { default: Note } = require('../built/models/note');
 const { default: MessagingMessage } = require('../built/models/messaging-message');
 const { default: User } = require('../built/models/user');
 
+const args = process.argv.slice(2);
+
+const skip = parseInt(args[0] || '0', 10);
+
 async function main() {
 	const promiseGens = [];
 
@@ -13,7 +17,7 @@ async function main() {
 
 	let prev;
 
-	for (let i = 0; i < count; i++) {
+	for (let i = skip; i < count; i++) {
 		promiseGens.push(() => {
 			const promise = new Promise(async (res, rej) => {
 				function skip() {