@live-change/task-service 0.9.102 → 0.9.104

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/task.ts +1 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/task-service",
3
- "version": "0.9.102",
3
+ "version": "0.9.104",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.9.102",
26
- "@live-change/relations-plugin": "^0.9.102"
25
+ "@live-change/framework": "^0.9.104",
26
+ "@live-change/relations-plugin": "^0.9.104"
27
27
  },
28
- "gitHead": "f6ae0458039c44025c609e2427e9c61bc4c4c7ec"
28
+ "gitHead": "6ee5d4a7d713cf488c79584381cb42adeb235c6d"
29
29
  }
package/task.ts CHANGED
@@ -52,12 +52,9 @@ async function createOrReuseTask(taskDefinition, props, causeType, cause, expire
52
52
  expireDate
53
53
  })
54
54
 
55
- //console.log("HASH", hash)
56
- //console.log("SIMILAR TASKS", similarTasks)
57
-
58
55
  const oldTask = similarTasks.find(similarTask => similarTask.name === taskDefinition.name
59
56
  && JSON.stringify(similarTask.properties) === propertiesJson
60
- && (!expireDate || new Date(similarTask.startedAt).getTime() > expireDate.getTime()))
57
+ && (!expireDate || (new Date(similarTask.startedAt).getTime() > expireDate.getTime())))
61
58
 
62
59
  const taskObject = oldTask
63
60
  ? await app.serviceViewGet('task', 'task', { task: oldTask.to || oldTask.id })