Skip to content

Commit

Permalink
fix: Mark outgoing mutation as inProcess if nextEventPromise exists (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wooj2 authored Apr 21, 2020
1 parent 352680b commit 3986cf5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ extension AWSMutationDatabaseAdapter: MutationEventIngester {
completionPromise: @escaping Future<MutationEvent, DataStoreError>.Promise) {

log.verbose("\(#function) mutationEvent: \(mutationEvent)")
storageAdapter.save(mutationEvent, condition: nil) { result in
var eventToPersist = mutationEvent
if nextEventPromise != nil {
eventToPersist.inProcess = true
}
storageAdapter.save(eventToPersist, condition: nil) { result in
switch result {
case .failure(let dataStoreError):
self.log.verbose("\(#function): Error saving mutation event: \(dataStoreError)")
Expand Down

0 comments on commit 3986cf5

Please sign in to comment.