pghoard/walreceiver.py
def fetch_timeline_history_files(self, max_timeline):
        """Copy all timeline history files found on the server without
           checking if we have them or not. The history files are very small
           so reuploading them should not matter."""
        while max_timeline > 1:
            self.c.execute("TIMELINE_HISTORY {}".format(max_timeline))
            timeline_history = self.c.fetchone()
            history_filename = timeline_history[0]
            history_data = timeline_history[1].tobytes()
            self.log.debug("Received timeline history: %s for timeline %r", history_filename, max_timeline)

            compression_event = CompressionEvent(
                compress_to_memory=True,
                source_data=BytesIO(history_data),
                file_path=FileTypePrefixes[FileType.Timeline] / history_filename,
                file_type=FileType.Timeline,
                backup_site_name=self.site,
                metadata={}
            )
            self.compression_queue.put(compression_event)
            max_timeline -= 1
Copy all timeline history files found on the server without
           checking if we have them or not. The history files are very small
           so reuploading them should not matter.
Copy all timeline history files found on the server without
checking if we have them or not. The history files are very small
so reuploading them should not matter.
Copy all timeline history files found on the server without checking if we have them or not . The history files are very small so reuploading them should not matter .
def fetch_timeline_history_files(self, max_timeline):
        while max_timeline > 1:
            self.c.execute("TIMELINE_HISTORY {}".format(max_timeline))
            timeline_history = self.c.fetchone()
            history_filename = timeline_history[0]
            history_data = timeline_history[1].tobytes()
            self.log.debug("Received timeline history: %s for timeline %r", history_filename, max_timeline)
            compression_event = CompressionEvent(
                compress_to_memory=True,
                source_data=BytesIO(history_data),
                file_path=FileTypePrefixes[FileType.Timeline] / history_filename,
                file_type=FileType.Timeline,
                backup_site_name=self.site,
                metadata={}
            )
            self.compression_queue.put(compression_event)
            max_timeline -= 1
def fetch_timeline_history_files ( self , max_timeline ) : while max_timeline > 1 : self . c . execute ( "TIMELINE_HISTORY {}" . format ( max_timeline ) ) timeline_history = self . c . fetchone ( ) history_filename = timeline_history [ 0 ] history_data = timeline_history [ 1 ] . tobytes ( ) self . log . debug ( "Received timeline history: %s for timeline %r" , history_filename , max_timeline ) compression_event = CompressionEvent ( compress_to_memory = True , source_data = BytesIO ( history_data ) , file_path = FileTypePrefixes [ FileType . Timeline ] / history_filename , file_type = FileType . Timeline , backup_site_name = self . site , metadata = { } ) self . compression_queue . put ( compression_event ) max_timeline -= 1
Copy all timeline history files found on the server without
checking if we have them or not.
Copy all timeline history files found on the server without checking if we have them or not .
"""Copy all timeline history files found on the server without
           checking if we have them or not. The history files are very small
           so reuploading them should not matter."""
self
max_timeline