Refactor code for API #3

Merged
mikael.capelle merged 13 commits from dev/refactor-for-ui into master 2024-12-08 13:06:42 +00:00
Showing only changes of commit 22b1513271 - Show all commits

View File

@ -181,16 +181,14 @@ def main():
current = datetime.now()
if api:
print(
json.dumps(
{
"type": "answer",
"answer": i_answer + 1,
"value": answer,
"answerTime_s": (current - last).total_seconds(),
"totalTime_s": (current - start).total_seconds(),
}
)
dump_api_message(
"answer",
{
"answer": i_answer + 1,
"value": answer,
"answerTime_s": (current - last).total_seconds(),
"totalTime_s": (current - start).total_seconds(),
},
)
else:
print(