Ajout d'un timer

This commit is contained in:
n07070 2022-03-11 18:36:36 +01:00
parent 47e89cc295
commit 35fc990bc0

View File

@ -11,6 +11,7 @@ from flask import Flask, request # Used for the web framework
from printer import Printer # The wrapper for the printer class
import toml # Used for the config file parsing
import pprint
import time
# Load the configuration file
try:
@ -67,4 +68,5 @@ def api_index():
def api_print_sms():
texte = request.args.get("txt",type=str)
app.logger.debug("Printing : " + texte)
time.sleep(10)
return printer.print_sms(texte)