Commit massif sur l'intranet
darcs-hash:20070602131029-c992d-820d228ff611f44b2a1fcb185633a65d865baad2.gz
This commit is contained in:
parent
1917896510
commit
5d71550f6b
6 changed files with 44 additions and 15 deletions
|
@ -29,12 +29,30 @@ import crans.impression
|
|||
import crans.impression.digicode
|
||||
import crans.impression.etat_imprimante
|
||||
import crans.cp
|
||||
from threading import Thread
|
||||
FILE_UPLOAD_BASE_FOLDER = cherrypy.config.get('fileUpload.folder', "/var/impression/fichiers/")
|
||||
|
||||
class FileError(Exception):
|
||||
pass
|
||||
from ClassesIntranet.ModuleBase import ModuleBase
|
||||
|
||||
|
||||
# #############################################################
|
||||
# Classe d'impression en multithread
|
||||
# #############################################################
|
||||
class threadedImpression(Thread, crans.impression.impression):
|
||||
def __init__(self, path_to_pdf, adh = None, callback = None):
|
||||
self.tpath_to_pdf = path_to_pdf
|
||||
self.tadh = adh
|
||||
Thread.__init__(self)
|
||||
|
||||
def run():
|
||||
crans.impression.impression.__init__(self, self.tpath_to_pdf, self.tadh)
|
||||
if self.tcallback:
|
||||
self.tcallback(self)
|
||||
|
||||
|
||||
|
||||
class main(ModuleBase):
|
||||
def category(self):
|
||||
return "Services"
|
||||
|
@ -136,7 +154,9 @@ class main(ModuleBase):
|
|||
crans.cp.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
useFile.exposed= True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# methode pour changer les parametres
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue