Changeset 3548
- Timestamp:
- 08/17/10 23:11:00 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/snmp.py
r3546 r3548 157 157 """Waits for printer status being 'printing'.""" 158 158 statusstabilizationdelay = constants.get(self.parent.filter, "StatusStabilizationDelay") 159 increment = 1160 159 noprintingmaxdelay = constants.get(self.parent.filter, "NoPrintingMaxDelay") 161 160 if not noprintingmaxdelay : … … 165 164 previousValue = self.parent.getLastPageCounter() 166 165 firstvalue = None 166 increment = 1 167 waitdelay = statusstabilizationdelay * increment 167 168 while True : 168 169 self.retrieveSNMPValues() 169 waitdelay = statusstabilizationdelay * increment170 170 error = self.checkIfError(self.printerDetectedErrorState) 171 171 pstatusAsString = printerStatusValues.get(self.printerStatus) … … 206 206 if waitdelay < constants.FIVEMINUTES : 207 207 increment *= 2 208 self.parent.filter.logdebug("Waiting %s seconds for printer %s to be printing..." % (waitdelay, self.parent.filter.PrinterName)) 208 else : 209 increment = 1 210 self.parent.filter.logdebug("Waiting %s seconds for printer %s to be printing..." % (waitdelay, 211 self.parent.filter.PrinterName)) 209 212 time.sleep(waitdelay) 213 waitdelay = statusstabilizationdelay * increment 210 214 211 215 def waitIdle(self) : … … 214 218 statusstabilizationloops = constants.get(self.parent.filter, "StatusStabilizationLoops") 215 219 increment = 1 220 waitdelay = statusstabilizationdelay * increment 216 221 idle_num = 0 217 222 while True : 218 223 self.retrieveSNMPValues() 219 waitdelay = statusstabilizationdelay * increment220 224 error = self.checkIfError(self.printerDetectedErrorState) 221 225 pstatusAsString = printerStatusValues.get(self.printerStatus) … … 242 246 if waitdelay < constants.FIVEMINUTES : 243 247 increment *= 2 248 else : 249 increment = 1 244 250 self.parent.filter.logdebug("Waiting %s seconds for printer %s's idle status to stabilize..." % (waitdelay, 245 251 self.parent.filter.PrinterName)) 246 252 time.sleep(waitdelay) 253 waitdelay = statusstabilizationdelay * increment 247 254 248 255 def retrieveInternalPageCounter(self) :