MCPcopy Index your code
hub / github.com/RustPython/RustPython / shouldRollover

Method shouldRollover

Lib/logging/handlers.py:363–380  ·  view source on GitHub ↗

Determine if rollover should occur. record is not used, as we are just comparing times, but it is needed so the method signatures are the same

(self, record)

Source from the content-addressed store, hash-verified

361 return result
362
363 def shouldRollover(self, record):
364 """
365 Determine if rollover should occur.
366
367 record is not used, as we are just comparing times, but it is needed so
368 the method signatures are the same
369 """
370 t = int(time.time())
371 if t >= self.rolloverAt:
372 # See #89564: Never rollover anything other than regular files
373 if os.path.exists(self.baseFilename) and not os.path.isfile(self.baseFilename):
374 # The file is not a regular file, so do not rollover, but do
375 # set the next rollover time to avoid repeated checks.
376 self.rolloverAt = self.computeRollover(t)
377 return False
378
379 return True
380 return False
381
382 def getFilesToDelete(self):
383 """

Callers 1

Calls 4

computeRolloverMethod · 0.95
timeMethod · 0.45
existsMethod · 0.45
isfileMethod · 0.45

Tested by 1