f
This commit is contained in:
parent
c51c95c42b
commit
d028ecb842
11
app.py
11
app.py
@ -85,12 +85,13 @@ def print_address_label(pdf_path):
|
||||
)
|
||||
|
||||
app.logger.info("Sending to printer...")
|
||||
send(
|
||||
status = send(
|
||||
instructions=instructions,
|
||||
printer_identifier=printer,
|
||||
backend_identifier=backend,
|
||||
blocking=True
|
||||
)
|
||||
print(status)
|
||||
app.logger.info("Print job sent successfully")
|
||||
|
||||
except Exception as e:
|
||||
@ -106,14 +107,6 @@ def process_queue():
|
||||
# Process the file (convert and print)
|
||||
app.logger.info(f"Processing file: {file_path}")
|
||||
print_address_label(file_path)
|
||||
wait = 15
|
||||
while wait > 0:
|
||||
# get printer status
|
||||
printer_status = status(printer_model, printer_identifier=printer, backend_identifier=backend)
|
||||
app.logger.info(f"Printer status: {printer_status}")
|
||||
print(printer_status)
|
||||
time.sleep(1)
|
||||
wait -= 1
|
||||
# Signal that the task is done
|
||||
file_queue.task_done()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user