Fix #1
All checks were successful
Build and push Docker image at git tag / build (push) Successful in 55s
All checks were successful
Build and push Docker image at git tag / build (push) Successful in 55s
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user