✌️
This commit is contained in:
@ -16,10 +16,6 @@ async function main() {
|
||||
for (let i = 0; i < count; i++) {
|
||||
promiseGens.push(() => {
|
||||
const promise = new Promise(async (res, rej) => {
|
||||
function skip() {
|
||||
res([i, file, false]);
|
||||
}
|
||||
|
||||
const file = await DriveFile.findOne(prev ? {
|
||||
_id: { $lt: prev._id }
|
||||
} : {}, {
|
||||
@ -30,6 +26,10 @@ async function main() {
|
||||
|
||||
prev = file;
|
||||
|
||||
function skip() {
|
||||
res([i, file, false]);
|
||||
}
|
||||
|
||||
if (file == null) return skip();
|
||||
|
||||
log(chalk`{gray ${i}} scanning {bold ${file._id}} ${file.filename} ...`);
|
||||
|
Reference in New Issue
Block a user