Gaëtan Renaudeau
6 years ago
No known key found for this signature in database
GPG Key ID: 7B66B85F042E5451
2 changed files with
5 additions and
4 deletions
-
src/commands/libcoreReset.js
-
src/helpers/reset.js
|
|
@ -7,9 +7,8 @@ import withLibcore from 'helpers/withLibcore' |
|
|
|
type Input = void |
|
|
|
type Result = boolean |
|
|
|
|
|
|
|
const cmd: Command<Input, Result> = createCommand( |
|
|
|
'libcoreReset', |
|
|
|
() => from(withLibcore(core => core.getPoolInstance().freshResetAll())) |
|
|
|
const cmd: Command<Input, Result> = createCommand('libcoreReset', () => |
|
|
|
from(withLibcore(core => core.getPoolInstance().freshResetAll())), |
|
|
|
) |
|
|
|
|
|
|
|
export default cmd |
|
|
|
|
|
@ -9,8 +9,10 @@ import killInternalProcess from 'commands/killInternalProcess' |
|
|
|
import libcoreReset from 'commands/libcoreReset' |
|
|
|
|
|
|
|
async function resetLibcore() { |
|
|
|
await libcoreReset.send().toPromise() |
|
|
|
// we need to stop everything that is happening right now, like syncs
|
|
|
|
await killInternalProcess.send().toPromise() |
|
|
|
// we can now ask libcore to reset itself
|
|
|
|
await libcoreReset.send().toPromise() |
|
|
|
} |
|
|
|
|
|
|
|
function reload() { |
|
|
|