@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.
@@ -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
- console.log("Checking Order Status");
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("MES_Order");
295
- query.greaterThanOrEqualTo("start", new Date(Date.now() - 24 * 60 * 60 * 1000));
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "2.4.73",
3
+ "version": "2.4.74",
4
4
  "description": "Parse Server Cloud Code for open.DASH",
5
5
  "keywords": [
6
6
  "parse",