Skip to content

Commit

Permalink
Merge pull request #356 from openimis/feature/fix-wait-for-mutation
Browse files Browse the repository at this point in the history
wrong  ORM
  • Loading branch information
delcroip authored Nov 8, 2024
2 parents 000e80d + a4b18e6 commit bb5cb33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/services/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def _base_payload_adjust(self, obj_data):


def wait_for_mutation(client_mutation_id):
mutation = MutationLog(client_mutation_id=client_mutation_id)
mutation = MutationLog.objects.filter(
client_mutation_id=client_mutation_id
).first()
if not mutation:
return
loop_count = 0
while mutation.status == MutationLog.RECEIVED and loop_count<10:
asyncio.sleep(0.3)
loop_count+= 1
loop_count += 1
return

0 comments on commit bb5cb33

Please sign in to comment.