project done but test failed
This commit is contained in:
@@ -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线程)
|
||||
])
|
||||
|
Reference in New Issue
Block a user