Show
Ignore:
Timestamp:
05/25/04 00:45:49 (20 years ago)
Author:
jalet
Message:

New 'enforcement' directive added
Polling loop improvements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/hardware.py

    r1494 r1495  
    2222# 
    2323# $Log$ 
     24# Revision 1.4  2004/05/24 22:45:49  jalet 
     25# New 'enforcement' directive added 
     26# Polling loop improvements 
     27# 
    2428# Revision 1.3  2004/05/24 14:36:40  jalet 
    2529# Revert to old polling loop. Will need optimisations 
     
    4448        """Initializes querying accounter.""" 
    4549        AccounterBase.__init__(self, kotabackend, arguments) 
    46         self.isDelayed = 1 # With the pykota filter, accounting is delayed by one job 
    4750         
    4851    def getPrinterInternalPageCounter(self) :     
     
    9295        return jobsize 
    9396         
    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 itself 
    97         counterbeforejob = self.getPrinterInternalPageCounter() or 0 
    98          
    99         # Is the current user allowed to print at all ? 
    100         action = self.filter.warnUserPQuota(userpquota) 
    101          
    102         # adds the current job to history     
    103         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 action 
    105          
    10697    def askPrinterPageCounter(self, printer) : 
    10798        """Returns the page counter from the printer via an external command.