mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
script can wait until the sync data has been applied
This commit is contained in:
@@ -327,6 +327,10 @@ async function updatePushStats() {
|
||||
}
|
||||
}
|
||||
|
||||
async function getMaxSyncId() {
|
||||
return await sql.getValue('SELECT MAX(id) FROM sync');
|
||||
}
|
||||
|
||||
sqlInit.dbReady.then(async () => {
|
||||
setInterval(cls.wrap(sync), 60000);
|
||||
|
||||
@@ -340,5 +344,6 @@ module.exports = {
|
||||
sync,
|
||||
login,
|
||||
getSyncRecords,
|
||||
stats
|
||||
stats,
|
||||
getMaxSyncId
|
||||
};
|
||||
Reference in New Issue
Block a user