Update bulk_import_images.ts
parent
4640eef7b5
commit
fa706cd662
|
@ -26,7 +26,7 @@ const fsPromises = fs.promises;
|
|||
|
||||
function splitToChunks(array:string[], parts:number) {
|
||||
const new_array = [...array]
|
||||
let result:any = []
|
||||
const result:any = []
|
||||
for (let i = parts; i > 0; i--) {
|
||||
const res = new_array.splice(0, Math.ceil(new_array.length / i))
|
||||
if (res.length===0){
|
||||
|
@ -87,4 +87,4 @@ if (cluster.isPrimary){
|
|||
setInterval(() => {}, 1000) // prevent master from exiting
|
||||
}else{
|
||||
import_images()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue