Skip to content
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

Closes #25 - Added MySQL prepost strategy & documentation #26

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

SrZorro
Copy link

@SrZorro SrZorro commented Jun 5, 2018

No description provided.

@@ -0,0 +1,11 @@
source /prexecute/utils/check-env.sh

if [ "$BACKUP_TYPE" = "backup" ] || [ "$BACKUP_TYPE" = "backupIncremental" ] || [ "$BACKUP_TYPE" = "backupFull" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##
function _check_env_failed {
echo "[!] ENV VAR $1 IS NOT SET"
printf "\n====ENVIRONMENT VARIABLES FAILED====\n\n"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called flagging - Clean Code. Do not use upper case chars and symbolic characters in order to make it appear better on logs. Does not work when everybody documents like that.

@blacklabelops
Copy link
Owner

blacklabelops commented Jun 5, 2018

Thanks for the example. Please take a note of my comments. Correction is not required.

@blacklabelops blacklabelops merged commit 4820cd8 into blacklabelops:master Jun 5, 2018
@SrZorro
Copy link
Author

SrZorro commented Jun 5, 2018

In my use case I also need a MongoDB strategy, tomorrow when i do it i can also push it as another example and i can fix the problems pointed in your comments.

For the second comment how would you do it? Without all the fancy symbolic characters and in lowercase?

SrZorro added a commit to SrZorro/volumerize that referenced this pull request Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants