Open laggingreflex opened 7 years ago
I've updated it to be a --disable-rsync
cli arg and disableRsync
as project config
I've also update the --no-delete
cli arg I added earlier to be --disable-deletion
cli arg and disableDeleteion
project arg
I'm currently testing it out and having some issues.
Don't merge it yet, I'll let you know when. Sorry for hasty commits.
I was forgetting about a particular callback which was causing the issue. Wrapping triggerBigSync
in an if
just like that was not a great idea:
if(..) {
triggerBigSync(projectConf, { debug: config.debug }, () => {
localLog(text.SYNC_ON_LARGE_CHANGE_DONE);
fsHelper.watch();
});
}
There's a callback there which wouldn't get called.
I've used async/await now (added a babel-preset-stage-0) with which it could be solved and simplified:
if (...) {
await triggerBigSync(projectConf, { debug: config.debug });
}
localLog(text.SYNC_ON_LARGE_CHANGE_DONE);
fsHelper.watch();
Although it alters the API a bit (triggerBigSync now returns a promise) so some tests might be failing. I'll see if I can work on those later in the week. Feel free to review now.
This looks great, we'll see what the CI finds test wise.
I just pushed some updates to get tests running (properly) again, sorry for the thrash. I can update your PR to resolve the conflicts here on Friday.
Lets you add an option
"triggerBigSync": false
in project conf to disable doing a big rsync.fixes #79