Skeudenn / main/db/backup-runner / createBackupMaker
Function: createBackupMaker() ​
createBackupMaker(
runner,db): (directory) =>Promise<BackupInfo>
Defined in: src/main/db/backup-runner.ts:107
The function runBackup calls: the copy goes through the worker thread; if the worker can't run at all (its bundle is missing, it cannot be loaded from the package), the copy is made on the calling thread, as it was before the worker existed, so a backup is never lost to it. A failure of the copy itself is not retried. An in-memory database, which has no file for the worker to open, is copied on the calling thread too.
Parameters ​
runner ​
db ​
DatabaseSync
Returns ​
(directory) => Promise<BackupInfo>