From: Christian Heller Date: Mon, 25 Nov 2024 02:40:47 +0000 (+0100) Subject: For sync script, download remote DB temporarily into PATH_TEMP. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/%7B%7Bprefix%7D%7D?a=commitdiff_plain;h=f3a102b4eb6f874f5f4f6965ce3a67d02dc24331;p=ytplom For sync script, download remote DB temporarily into PATH_TEMP. --- diff --git a/src/sync.py b/src/sync.py index fb02e05..27980cd 100755 --- a/src/sync.py +++ b/src/sync.py @@ -11,7 +11,7 @@ from urllib.request import urlopen from paramiko import SSHClient # type: ignore from scp import SCPClient # type: ignore from ytplom.misc import ( - PATH_DB, PATH_DOWNLOADS, + PATH_DB, PATH_DOWNLOADS, PATH_TEMP, DatabaseConnection, PathStr, QueryId, QuotaLog, VideoFile, YoutubeQuery, YoutubeVideo) @@ -28,7 +28,7 @@ RowData: TypeAlias = tuple[str, RelationData: TypeAlias = tuple[str, list[YoutubeVideo], DatabaseConnection] -PATH_DB_REMOTE = PathStr('remote_db.sql') +PATH_DB_REMOTE = PathStr(path_join(PATH_TEMP, 'remote_db.sql')) URL_MISSING_JSON = f'http://{YTPLOM_REMOTE}:{YTPLOM_PORT}/missing.json'