✌️
This commit is contained in:
		
							parent
							
								
									97b7567770
								
							
						
					
					
						commit
						06c453c3bc
					
				
					 2 changed files with 50 additions and 31 deletions
				
			
		| 
						 | 
				
			
			@ -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} ...`);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue