project done but test failed

This commit is contained in:
Burgess Leo
2025-05-27 13:10:13 +08:00
parent 491685e892
commit 4d7c2e995c
4 changed files with 41 additions and 55 deletions

View File

@@ -1,14 +1,14 @@
import sqlite3
import subprocess
db_path = "../src/db_ntfs_info.db"
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
source_path = r"Y:\\test-copy"
target_path = r"Z:\\test-copy"
def GetDeviceId(cursor: sqlite3.Cursor) -> int:
cursor.execute("SELECT ID FROM db_device ORDER BY ID LIMIT 1")
result = cursor.fetchone()
return result[0] if result else 0
print(GetDeviceId(cursor))
subprocess.run([
"robocopy",
source_path,
target_path,
"/E", # 包括子目录
"/R:3", # 重试次数
"/W:1", # 重试等待时间
"/MT:16" # 多线程16线程
])