def _fsync(self, f): if self.configuration.get("storage", "_filesystem_fsync"): try: pathutils.fsync(f.fileno()) except OSError as e: raise RuntimeError("Fsync'ing file %r failed: %s" % (f.name, e)) from e
def _sync_directory(self, path): """Sync directory to disk. This only works on POSIX and does nothing on other systems. """ if not self.configuration.get("storage", "_filesystem_fsync"): return if os.name == "posix": try: fd = os.open(path, 0) try: pathutils.fsync(fd) finally: os.close(fd) except OSError as e: raise RuntimeError("Fsync'ing directory %r failed: %s" % (path, e)) from e
def _fsync(self, fd): if self.configuration.get("storage", "_filesystem_fsync"): pathutils.fsync(fd)
def _fsync(self, fd): if self.configuration.get("internal", "filesystem_fsync"): pathutils.fsync(fd)
def _fsync(cls, fd): if cls.configuration.getboolean("internal", "filesystem_fsync"): pathutils.fsync(fd)
def _fsync(cls, fd): if cls.configuration.getboolean("internal", "filesystem_fsync"): pathutils.fsync(fd)