@things-factory/integration-base 7.0.1-beta.25 → 7.0.1-beta.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-base",
3
- "version": "7.0.1-beta.25",
3
+ "version": "7.0.1-beta.26",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -44,5 +44,5 @@
44
44
  "readline": "^1.3.0",
45
45
  "vm2": "^3.9.11"
46
46
  },
47
- "gitHead": "61cb1f1b77a220cc71339935ead12047d54ad317"
47
+ "gitHead": "bc010946852bd43ec233a4a1a5a3684d79e110fe"
48
48
  }
@@ -69,7 +69,7 @@ export async function runScenario(
69
69
  }
70
70
 
71
71
  if (scenario.ttl > 0) {
72
- const cachedValue = await cacheService.getFromCache(scenario.id, variables || {})
72
+ const cachedValue = await cacheService.getFromCache(scenario.id, { domain: domain.id, variables: variables || {} })
73
73
  if (cachedValue) {
74
74
  return cachedValue.value
75
75
  }
@@ -338,7 +338,7 @@ export class ScenarioInstance {
338
338
  return sum
339
339
  }, {})
340
340
 
341
- const { scenarioId, scenarioTtl, variables, message, scenarioName, instanceName, result } = this
341
+ const { scenarioId, scenarioTtl, variables, message, scenarioName, instanceName, result, domain } = this
342
342
  const obj = {
343
343
  scenarioName,
344
344
  instanceName,
@@ -352,7 +352,7 @@ export class ScenarioInstance {
352
352
 
353
353
  if (this.scenarioTtl && this.scenarioId) {
354
354
  setTimeout(() => {
355
- cacheService.setInCache(scenarioId, variables || {}, obj, scenarioTtl)
355
+ cacheService.setInCache(scenarioId, { domain: domain.id, variables: variables || {} }, obj, scenarioTtl)
356
356
  })
357
357
  }
358
358