@openinc/parse-server-opendash 2.4.73 → 2.4.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/MES_Order.js +5 -3
- package/package.json +1 -1
package/dist/hooks/MES_Order.js
CHANGED
|
@@ -289,11 +289,13 @@ async function createValueArrayForObject(object, extraValues, fields) {
|
|
|
289
289
|
function scheduleOrderStartedStatusCheck(cronInterval) {
|
|
290
290
|
const job = new cron_1.CronJob(cronInterval, // cronTime
|
|
291
291
|
() => {
|
|
292
|
-
|
|
292
|
+
const date = new Date(Date.now() - 24 * 60 * 60 * 1000);
|
|
293
|
+
console.log(`Checking Order Status for Orders started in the last 24 hours (Since ${date.toISOString()})`);
|
|
293
294
|
//Orders of last 24 hours
|
|
294
|
-
const query = new Parse.Query(
|
|
295
|
-
query.greaterThanOrEqualTo("start",
|
|
295
|
+
const query = new Parse.Query(types_1.MES_Order);
|
|
296
|
+
query.greaterThanOrEqualTo("start", date);
|
|
296
297
|
query.find({ useMasterKey: true }).then((orders) => {
|
|
298
|
+
console.log(`Checking ${orders.length} Orders`);
|
|
297
299
|
orders.forEach((order) => {
|
|
298
300
|
const status = order.get("status");
|
|
299
301
|
if (!status) {
|