-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: disable triggerBigSync #84
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're adding a new field to the project configuration, could also add the appropriate prompt when setting up a new project? Should be in: https://github.com/appnexus/sicksync/blob/master/src/project-helper.js#L18
src/local/index.js
Outdated
'encryption' | ||
); | ||
}); | ||
if (projectConf.triggerBigSync !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably just do if (projectConf.triggerBigSync) {
. Older configurations won't have this definition, and will returnundefined
, which is falsy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking for not false
. If older config has it undefined
then this would be true which is the current default behavior. if (projectConf.triggerBigSync) {
would disable it for all older configs that have it undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it better be labeled as something like disableRsync which would be totally new option and not break any previous config?
I've updated it to be a I've also update the |
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
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:
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. |
b861ede
to
9041df9
Compare
Lets you add an option `"triggerBigSync": false` in project conf to disable doing a big rsync.
Update the logic that controlled disabling deletion from just a --no-delete argument to --disable-deletion argument as well as "disableDeleteion" project config
9041df9
to
0a7dffa
Compare
@@ -43,5 +43,11 @@ export function bigSync(project) { | |||
rsync.output(consoleLogFromBuffer, consoleLogFromBuffer); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
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