@openinc/parse-server-opendash 2.4.72 → 2.4.73

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.
@@ -296,12 +296,30 @@ function scheduleOrderStartedStatusCheck(cronInterval) {
296
296
  query.find({ useMasterKey: true }).then((orders) => {
297
297
  orders.forEach((order) => {
298
298
  const status = order.get("status");
299
- if (status === "unknown" || status === "planned") {
300
- if (order.get("start").getTime() < Date.now()) {
301
- order.set("status", "running");
299
+ if (!status) {
300
+ if (order.get("tag")) {
301
+ if (order.get("start").getTime() < Date.now()) {
302
+ order.set("status", "running");
303
+ order.save(null, { useMasterKey: true });
304
+ }
305
+ else {
306
+ order.set("status", "planned");
307
+ order.save(null, { useMasterKey: true });
308
+ }
309
+ }
310
+ else {
311
+ order.set("status", "unknown");
302
312
  order.save(null, { useMasterKey: true });
303
313
  }
304
314
  }
315
+ else {
316
+ if (status === "unknown" || status === "planned") {
317
+ if (order.get("start").getTime() < Date.now()) {
318
+ order.set("status", "running");
319
+ order.save(null, { useMasterKey: true });
320
+ }
321
+ }
322
+ }
305
323
  });
306
324
  });
307
325
  }, // onTick
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "2.4.72",
3
+ "version": "2.4.73",
4
4
  "description": "Parse Server Cloud Code for open.DASH",
5
5
  "keywords": [
6
6
  "parse",