Skip to content

Commit 813b897

Browse files
authored
need to keep the algorithm loop running continously
1 parent 2a22e99 commit 813b897

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

adk/ADK.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,12 @@ def process_local(self, local_payload, pprint):
137137
self.write_to_pipe(result, pprint=pprint)
138138

139139
def init(self, local_payload=None, pprint=print):
140-
self.load()
141-
if self.loading_exception:
142-
load_error = self.create_exception(self.loading_exception, loading_exception=True)
143-
self.write_to_pipe(load_error, pprint=pprint)
144-
elif self.is_local and local_payload:
145-
self.process_local(local_payload, pprint)
146-
else:
147-
self.process_loop()
140+
while True:
141+
self.load()
142+
if self.loading_exception:
143+
load_error = self.create_exception(self.loading_exception, loading_exception=True)
144+
self.write_to_pipe(load_error, pprint=pprint)
145+
elif self.is_local and local_payload:
146+
self.process_local(local_payload, pprint)
147+
else:
148+
self.process_loop()

0 commit comments

Comments
 (0)