Fix #1
All checks were successful
Build and push Docker image at git tag / build (push) Successful in 55s

This commit is contained in:
2024-10-31 16:25:37 +01:00
parent e7910021dd
commit cc4bb9a7e8
13 changed files with 1157 additions and 989 deletions

View File

@ -8,7 +8,7 @@
# source code released under the terms of GNU Public License Version 3
# https://www.gnu.org/licenses/gpl-3.0.txt
import random, os, json
import random, os, json, time
from abc import abstractmethod, ABC
from enum import Enum
@ -64,6 +64,10 @@ class BasicAgent(ABC):
pass
def _respond(self):
# do a very short sleep
time.sleep(random.random())
# sending
send_it = lambda: self._send_message(self._response)
if self.before_response(self._response, send_it) and self._do_response:
send_it()