Skip to content

Commit

Permalink
pghoard: added a thread for processing the "download_results" queue
Browse files Browse the repository at this point in the history
Added a new DownloadResultsProcessor thread, which validates downloaded files and saves them to the target: '<pg_wal>/<wal_name>.tmp' -> '<pg_wal>/<wal_name>.prefetch'.
Files with "prefetch" suffix can be copied to the destination without extra checks now.
Also changed items type for "pending_download_ops" dict from "dict" to "dataclass" (PendingDownloadOp)
  • Loading branch information
egor-voynov-aiven committed Mar 26, 2024
1 parent 078c81f commit d62770c
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 108 deletions.
4 changes: 2 additions & 2 deletions pghoard/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ class UnhandledThreadException(Exception):


class PGHoardThread(Thread):
def __init__(self):
super().__init__()
def __init__(self, name: Optional[str] = None):
super().__init__(name=name)
self.exception: Optional[Exception] = None

def run_safe(self):
Expand Down
Loading

0 comments on commit d62770c

Please sign in to comment.