@live-change/framework
Advanced tools
Comparing version 0.3.28 to 0.3.29
@@ -140,3 +140,3 @@ const ReactiveDao = require("@live-change/dao") | ||
await service.start(config || {}) | ||
console.log("service started", serviceDefinition.name, "!") | ||
return service | ||
@@ -143,0 +143,0 @@ } |
@@ -92,3 +92,7 @@ const utils = require("../utils.js") | ||
async execute(props) { | ||
await modelRuntime().update(props[idName], { ...props.data, id: props[idName] }) | ||
if(crud.updateMethod == 'create') { | ||
await modelRuntime().create({ ...props.data, id: props[idName] }) | ||
} else { | ||
await modelRuntime().update(props[idName], { ...props.data, id: props[idName] }) | ||
} | ||
} | ||
@@ -95,0 +99,0 @@ }) |
@@ -80,3 +80,3 @@ | ||
console.log("Index State", searchIndexState) | ||
console.log("first Source Operation", firstSourceOperation) | ||
console.log("first Source Operation", firstSourceOperation.id) | ||
@@ -136,2 +136,7 @@ let lastUpdateTimestamp = 0 | ||
const operations = this.queue | ||
if(operations.length == 0) { | ||
console.log("NO OPERATIONS") | ||
this.lastUpdateId = this.queueLastUpdateId | ||
return | ||
} | ||
const queueResolve = this.queueWriteResolve | ||
@@ -200,3 +205,3 @@ this.queueWriteResolve = null | ||
const lastUpdateId = ops[ops.length-1].id | ||
// console.log("ES OPS", operations) | ||
//console.log("ES OPS", operations) | ||
this.queue = this.queue.length ? this.queue.concat(operations) : operations | ||
@@ -239,3 +244,2 @@ this.queueLastUpdateId = lastUpdateId | ||
}]) | ||
//console.log("GOT TABLE OPS", this.databaseName, this.tableName, ":", JSON.stringify(ops, null, " ")) | ||
await this.applyOps(ops) | ||
@@ -242,0 +246,0 @@ } while(ops.length >= bucketSize) |
@@ -139,3 +139,2 @@ const Model = require("./Model.js") | ||
this.commandQueue.addCommandHandler(actionName, async (command) => { | ||
let emittedEvents = new Map() | ||
const reportFinished = action.definition.waitForEvents ? 'trigger_'+trig.id : undefined | ||
@@ -158,3 +157,2 @@ const flags = { commandId: command.id, reportFinished } | ||
this.commandQueue.addCommandHandler(actionName, async (command) => { | ||
let emittedEvents = new Map() | ||
const reportFinished = command.waitForEvents ? 'trigger_'+trig.id : undefined | ||
@@ -245,2 +243,3 @@ const flags = { commandId: command.id, reportFinished } | ||
async startSearchIndexer() { | ||
console.log("starting search indexer!") | ||
await this.dao.request(['database', 'createTable'], this.databaseName, 'searchIndexes').catch(e => 'ok') | ||
@@ -277,2 +276,3 @@ | ||
await Promise.all(promises) | ||
console.log("search indexer started!") | ||
} | ||
@@ -279,0 +279,0 @@ |
{ | ||
"name": "@live-change/framework", | ||
"version": "0.3.28", | ||
"version": "0.3.29", | ||
"description": "Live Change Framework - ultimate solution for real time mobile/web apps", | ||
@@ -24,3 +24,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@live-change/dao-websocket": "^0.2.10", | ||
"@live-change/dao": "^0.2.21", | ||
"@live-change/dao-websocket": "^0.2.12", | ||
"@live-change/db": "^0.2.5", | ||
@@ -27,0 +28,0 @@ "@live-change/db-store-level": "^0.1.9", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131899
3620
19