home · contact · privacy
For sync script, download remote DB temporarily into PATH_TEMP.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 25 Nov 2024 02:40:47 +0000 (03:40 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 25 Nov 2024 02:40:47 +0000 (03:40 +0100)
src/sync.py

index fb02e05cc37e4a7d64ef1a4d650cf0d13366aa46..27980cdfcb33b155ebab1e9ace6d9132645222f7 100755 (executable)
@@ -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'