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