Show
Ignore:
Timestamp:
04/14/07 10:50:47 (17 years ago)
Author:
jerome
Message:

Added the 'skipinitialwait' directive to pykota.conf.
This halves the inter-job delay when using hardware accounting
when set.

Files:
1 modified

Legend:

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

    r3161 r3162  
    109109class BaseHandler : 
    110110    """A class for SNMP print accounting.""" 
    111     def __init__(self, parent, printerhostname) : 
     111    def __init__(self, parent, printerhostname, skipinitialwait=False) : 
    112112        self.parent = parent 
    113113        self.printerHostname = printerhostname 
     114        self.skipinitialwait = skipinitialwait 
    114115        try : 
    115116            self.community = self.parent.arguments.split(":")[1].strip() 
     
    210211        while 1 : 
    211212            self.retrieveSNMPValues() 
     213            if (self.printerInternalPageCounter is not None) \ 
     214               and self.skipinitialwait \ 
     215               and (os.environ.get("PYKOTAPHASE") == "BEFORE") : 
     216                self.parent.filter.logdebug("No need to wait for the printer to be idle, this should be the case already.") 
     217                return  
    212218            pstatusAsString = printerStatusValues.get(self.printerStatus) 
    213219            dstatusAsString = deviceStatusValues.get(self.deviceStatus)