Changeset 1497
- Timestamp:
- 05/25/04 07:17:52 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1495 r1497 24 24 # 25 25 # $Log$ 26 # Revision 1.50 2004/05/25 05:17:50 jalet 27 # Now precomputes the job's size only if current printer's enforcement 28 # is "STRICT" 29 # 26 30 # Revision 1.49 2004/05/24 22:45:48 jalet 27 31 # New 'enforcement' directive added … … 256 260 257 261 # checks the user's quota 258 self.softwareJobPrice = userpquota.computeJobPrice(self.softwareJobSize) 262 if self.config.getPrinterEnforcement(printer.Name) == "STRICT" : 263 self.softwareJobSize = self.precomputeJobSize() 264 self.logdebug("Precomputed job's size is : %s pages" % self.softwareJobSize) 265 self.softwareJobPrice = userpquota.computeJobPrice(self.softwareJobSize) 259 266 action = self.warnUserPQuota(userpquota) 260 267 -
pykota/trunk/NEWS
r1495 r1497 24 24 - 1.19alpha14 : 25 25 26 - Pre-computation of the job's size is now only 27 done when enforcement is "STRICT", this saves 28 CPU for people who don't want to use this new 29 feature. 30 26 31 - New 'enforcement' directive which accepts either 27 32 STRICT or LAXIST. See sample configuration file -
pykota/trunk/pykota/tool.py
r1495 r1497 22 22 # 23 23 # $Log$ 24 # Revision 1.91 2004/05/25 05:17:52 jalet 25 # Now precomputes the job's size only if current printer's enforcement 26 # is "STRICT" 27 # 24 28 # Revision 1.90 2004/05/24 22:45:49 jalet 25 29 # New 'enforcement' directive added … … 383 387 self.smtpserver = self.config.getSMTPServer() 384 388 self.maildomain = self.config.getMailDomain() 389 self.softwareJobSize = 0 385 390 self.softwareJobPrice = 0.0 386 391 … … 802 807 self.exportJobInfo() 803 808 self.jobdatastream = self.openJobDataStream() 804 self.softwareJobSize = self.precomputeJobSize()805 self.logdebug("Precomputed job's size is : %s pages" % self.softwareJobSize)806 809 807 810 def openJobDataStream(self) : … … 838 841 """Computes the job size with a software method.""" 839 842 self.logdebug("Precomputing job's size with generic PDL analyzer...") 843 self.jobdatastream.seek(0) 840 844 try : 841 845 parser = pdlanalyzer.PDLAnalyzer(self.jobdatastream)