fix print task set sleep for print new task
This commit is contained in:
parent
be0bc91d61
commit
fd41bdd82d
|
@ -7,6 +7,7 @@ import traceback
|
|||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from .printing.protocols import FileSSH
|
||||
|
||||
|
@ -149,12 +150,12 @@ class Receipt(object):
|
|||
elif self._interface == 'network':
|
||||
try:
|
||||
host, port = self._device.split(":")
|
||||
except:
|
||||
except Exception:
|
||||
host, port = self._device, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
self._printer = printer.Network(host, port=int(port), timeout=60)
|
||||
else:
|
||||
self._printer = printer.Network(host, timeout=15)
|
||||
self._printer = printer.Network(host, timeout=60)
|
||||
elif self._interface == 'ssh':
|
||||
self._printer = FileSSH(*self._device.split('@'))
|
||||
self._printer.open()
|
||||
|
@ -483,6 +484,7 @@ class Receipt(object):
|
|||
except Exception as e:
|
||||
print(e)
|
||||
traceback.print_exc()
|
||||
time.sleep(1)
|
||||
|
||||
def print_header(self, short=False):
|
||||
if not short:
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "6.0.22"
|
||||
__version__ = "6.0.23"
|
||||
|
|
Loading…
Reference in New Issue