mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-25 22:29:25 -05:00
last_synced is now updated after sync is completed
This commit is contained in:
+5
-3
@@ -29,7 +29,7 @@ async function sync() {
|
||||
});
|
||||
|
||||
try {
|
||||
sql.beginTransaction();
|
||||
await sql.beginTransaction();
|
||||
|
||||
for (const treeItem of resp.tree) {
|
||||
delete treeItem['id'];
|
||||
@@ -73,10 +73,12 @@ async function sync() {
|
||||
}
|
||||
}
|
||||
|
||||
sql.commit();
|
||||
await sql.setOption('last_synced', syncTimestamp);
|
||||
|
||||
await sql.commit();
|
||||
}
|
||||
catch (e) {
|
||||
sql.rollback();
|
||||
await sql.rollback();
|
||||
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user