diff options
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index 4ea43eb..7ee4b91 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -277,22 +277,22 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size) | |||
277 | 277 | ||
278 | SinkTrace() << "Moving entity to new resource " << newEntity.identifier() << newEntity.resourceInstanceIdentifier() << targetResource; | 278 | SinkTrace() << "Moving entity to new resource " << newEntity.identifier() << newEntity.resourceInstanceIdentifier() << targetResource; |
279 | auto job = TypeHelper<CreateHelper>{bufferType}.operator()<KAsync::Job<void>, ApplicationDomain::ApplicationDomainType&>(newEntity); | 279 | auto job = TypeHelper<CreateHelper>{bufferType}.operator()<KAsync::Job<void>, ApplicationDomain::ApplicationDomainType&>(newEntity); |
280 | job = job.syncThen<void>([this, newEntity, isMove, targetResource, bufferType](const KAsync::Error &error) { | 280 | job = job.syncThen<void>([this, current, isMove, targetResource, bufferType](const KAsync::Error &error) { |
281 | if (!error) { | 281 | if (!error) { |
282 | SinkTrace() << "Move of " << newEntity.identifier() << "was successfull"; | 282 | SinkTrace() << "Move of " << current.identifier() << "was successfull"; |
283 | if (isMove) { | 283 | if (isMove) { |
284 | startTransaction(); | 284 | startTransaction(); |
285 | flatbuffers::FlatBufferBuilder fbb; | 285 | flatbuffers::FlatBufferBuilder fbb; |
286 | auto entityId = fbb.CreateString(newEntity.identifier()); | 286 | auto entityId = fbb.CreateString(current.identifier()); |
287 | auto type = fbb.CreateString(bufferType); | 287 | auto type = fbb.CreateString(bufferType); |
288 | auto location = Sink::Commands::CreateDeleteEntity(fbb, newEntity.revision(), entityId, type, true); | 288 | auto location = Sink::Commands::CreateDeleteEntity(fbb, current.revision(), entityId, type, true); |
289 | Sink::Commands::FinishDeleteEntityBuffer(fbb, location); | 289 | Sink::Commands::FinishDeleteEntityBuffer(fbb, location); |
290 | const auto data = BufferUtils::extractBuffer(fbb); | 290 | const auto data = BufferUtils::extractBuffer(fbb); |
291 | deletedEntity(data, data.size()).exec(); | 291 | deletedEntity(data, data.size()).exec(); |
292 | commit(); | 292 | commit(); |
293 | } | 293 | } |
294 | } else { | 294 | } else { |
295 | SinkError() << "Failed to move entity " << targetResource << " to resource " << newEntity.identifier(); | 295 | SinkError() << "Failed to move entity " << targetResource << " to resource " << current.identifier(); |
296 | } | 296 | } |
297 | }); | 297 | }); |
298 | job.exec(); | 298 | job.exec(); |