mMerge branch 'master' of bitbucket.org:panleicim/appointment_tool_js

This commit is contained in:
2023-03-01 09:32:24 +01:00
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -277,6 +277,10 @@ adb -s emulator-5558 shell pm clear com.android.chrome
adb -s emulator-5558 shell am set-debug-app --persistent com.android.chrome adb -s emulator-5558 shell am set-debug-app --persistent com.android.chrome
adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
adb -s emulator-5560 shell pm clear com.android.chrome
adb -s emulator-5560 shell am set-debug-app --persistent com.android.chrome
adb -s emulator-5560 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
#18 #18
adb -s 192.168.0.37:5555 shell pm clear com.android.chrome adb -s 192.168.0.37:5555 shell pm clear com.android.chrome
adb -s 192.168.0.37:5555 shell am set-debug-app --persistent com.android.chrome adb -s 192.168.0.37:5555 shell am set-debug-app --persistent com.android.chrome
+3 -3
View File
@@ -7,7 +7,7 @@ const schedule = require("node-schedule");
const mongoManager = new MongoManager(); const mongoManager = new MongoManager();
const SEVEN_DAYS_IN_S = 3600 * 24 * 7; const SEVEN_DAYS_IN_S = 3600 * 24 * 7;
const THIRTY_DAYS_IN_S = 3600 * 24 * 30; const NINETY_DAYS_IN_S = 3600 * 24 * 30 * 3;
let excelUtil = new ExcelUtil(); let excelUtil = new ExcelUtil();
let collectionName = formatDate(new Date()) let collectionName = formatDate(new Date())
device_to_excludes = ["47e7e36b", "e30eb015"] device_to_excludes = ["47e7e36b", "e30eb015"]
@@ -33,7 +33,7 @@ async function filterAlreadyAccepteddContacts(contactList) {
console.log("=====handle already accepted item before booking===="); console.log("=====handle already accepted item before booking====");
console.log("accepted_at is " + acceptedItem.accepted_at); console.log("accepted_at is " + acceptedItem.accepted_at);
console.log("accepted email is " + acceptedItem.email); console.log("accepted email is " + acceptedItem.email);
needToBook = acceptedItem.accepted_at + THIRTY_DAYS_IN_S <= (new Date()) / 1000; needToBook = acceptedItem.accepted_at + NINETY_DAYS_IN_S <= (new Date()) / 1000;
if (!needToBook) { if (!needToBook) {
console.log("already accepted appointment --> skip"); console.log("already accepted appointment --> skip");
} }
@@ -100,7 +100,7 @@ async function needToBook(contact, mongoManager) {
console.log("=====handle already accepted item===="); console.log("=====handle already accepted item====");
console.log("accepted_at is " + acceptedItem.accepted_at); console.log("accepted_at is " + acceptedItem.accepted_at);
console.log("accepted email is " + acceptedItem.email); console.log("accepted email is " + acceptedItem.email);
needToBook = acceptedItem.accepted_at + THIRTY_DAYS_IN_S <= (new Date()) / 1000; needToBook = acceptedItem.accepted_at + NINETY_DAYS_IN_S <= (new Date()) / 1000;
if (!needToBook) { if (!needToBook) {
console.log("already accepted appointment --> skip"); console.log("already accepted appointment --> skip");
} }