|
@@ -76,8 +76,6 @@ def execute():
|
|
|
|
|
|
def run_command_and_respond():
|
|
|
app.logger.info(f"Entering command thread for {msg.message_id}")
|
|
|
- app.logger.info(f"Sleeping for {SLEEP_TIME:.3f}s before executing command")
|
|
|
- time.sleep(SLEEP_TIME)
|
|
|
t = time.time()
|
|
|
try:
|
|
|
response = rollbot.run_command(msg)
|
|
@@ -91,6 +89,11 @@ def execute():
|
|
|
|
|
|
app.logger.info(f"Responding to message {msg.message_id}")
|
|
|
|
|
|
+ sleep = SLEEP_TIME - time.time() + t
|
|
|
+ if sleep > 0:
|
|
|
+ app.logger.info(f"Sleeping for {sleep:.3f}s before responding")
|
|
|
+ time.sleep(sleep)
|
|
|
+
|
|
|
bot_id = BOTS_LOOKUP[msg.group_id]
|
|
|
if response.is_success:
|
|
|
if response.txt is not None:
|