Skip to content

Commit

Permalink
Remove redundant looping inside escrower recur method
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubel Hassan Mollik committed Jun 24, 2024
1 parent 7988c97 commit 19a4bd9
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/keria/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
import json
import datetime
import os
from dataclasses import asdict
from urllib.parse import urlparse, urljoin
Expand Down Expand Up @@ -750,20 +749,19 @@ def __init__(self, kvy, rgy, rvy, tvy, exc, vry, registrar, credentialer):

super(Escrower, self).__init__(tock=self.tock)

def recur(self, tyme=None):
def recur(self, tyme):
""" Process all escrows once per loop. """
while True:
self.kvy.processEscrows()
self.kvy.processEscrowDelegables()
self.rgy.processEscrows()
self.rvy.processEscrowReply()
if self.tvy is not None:
self.tvy.processEscrows()
self.exc.processEscrow()
self.vry.processEscrows()
self.registrar.processEscrows()
self.credentialer.processEscrows()
yield self.tock
self.kvy.processEscrows()
self.kvy.processEscrowDelegables()
self.rgy.processEscrows()
self.rvy.processEscrowReply()
if self.tvy is not None:
self.tvy.processEscrows()
self.exc.processEscrow()
self.vry.processEscrows()
self.registrar.processEscrows()
self.credentialer.processEscrows()
return False


def loadEnds(app):
Expand Down

0 comments on commit 19a4bd9

Please sign in to comment.