Changeset 1495 for pykota/trunk/pykota/accounters/hardware.py
- Timestamp:
- 05/25/04 00:45:49 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/hardware.py
r1494 r1495 22 22 # 23 23 # $Log$ 24 # Revision 1.4 2004/05/24 22:45:49 jalet 25 # New 'enforcement' directive added 26 # Polling loop improvements 27 # 24 28 # Revision 1.3 2004/05/24 14:36:40 jalet 25 29 # Revert to old polling loop. Will need optimisations … … 44 48 """Initializes querying accounter.""" 45 49 AccounterBase.__init__(self, kotabackend, arguments) 46 self.isDelayed = 1 # With the pykota filter, accounting is delayed by one job47 50 48 51 def getPrinterInternalPageCounter(self) : … … 92 95 return jobsize 93 96 94 def doAccounting(self, userpquota) :95 """Does print accounting and returns if the job status is ALLOW or DENY."""96 # Get the page counter directly from the printer itself97 counterbeforejob = self.getPrinterInternalPageCounter() or 098 99 # Is the current user allowed to print at all ?100 action = self.filter.warnUserPQuota(userpquota)101 102 # adds the current job to history103 userpquota.Printer.addJobToHistory(self.filter.jobid, userpquota.User, counterbeforejob, action, filename=self.filter.preserveinputfile, title=self.filter.title, copies=self.filter.copies, options=self.filter.options)104 return action105 106 97 def askPrinterPageCounter(self, printer) : 107 98 """Returns the page counter from the printer via an external command.