local changes
This commit is contained in:
+6
-7
@@ -145,28 +145,27 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
||||
return
|
||||
}
|
||||
mongoManager.connect().then(r => {
|
||||
filterAlreadyAccepteddContacts(contactList).then(notAcceptedContacts => {
|
||||
filterAlreadyBookedContacts(contactList).then((listToBook)=>{
|
||||
filterAlreadyAccepteddContacts(listToBook).then(notAcceptedContacts => {
|
||||
filterBlacklistedContacts(notAcceptedContacts).then(listWithoutBlackContact => {
|
||||
filterAlreadyBookedContacts(listWithoutBlackContact).then(listToBook => {
|
||||
console.log("number of contacts to book:" + listToBook.length)
|
||||
console.log("number of contacts to book:" + listWithoutBlackContact.length)
|
||||
android.devices().then((devices) => {
|
||||
if (devices.length === 0) {
|
||||
alert("未找到连接的设备");
|
||||
return
|
||||
}
|
||||
let segmentNumber = listToBook.length / devices.length;
|
||||
let segmentNumber = listWithoutBlackContact.length / devices.length;
|
||||
console.log("connected device number:" + devices.length)
|
||||
console.log("segmentNumber:" + segmentNumber)
|
||||
for (let i = 0; i < devices.length; i++) {
|
||||
startWithList(listToBook.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep);
|
||||
startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = startBookWithNumbers
|
||||
Reference in New Issue
Block a user