-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add verbosity option 2: Include TOUCH and DIFF output in email (only) if no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded). #121
base: dev
Are you sure you want to change the base?
Conversation
…failed checks) Send a verbose ("long") email if VERBOSITY is set to 2 and no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded) (i.e. CHK_FAIL is 1 and DO_SYNC is 0).
…failed checks) Send a verbose ("long") email if VERBOSITY is set to 2 and no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded) (i.e. CHK_FAIL is 1 and DO_SYNC is 0).
…failed checks) Send a verbose ("long") email if VERBOSITY is set to 2 and no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded) (i.e. CHK_FAIL is 1 and DO_SYNC is 0).
…failed checks) Send a verbose ("long") email if VERBOSITY is set to 2 and no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded) (i.e. CHK_FAIL is 1 and DO_SYNC is 0).
…failed checks) Add verbosity option 2: Include TOUCH and DIFF output in email (only) if no sync was run because of failed checks (deleted or updated files threshold has been reached or exceeded).
I like the idea to show touch and diff output when thresholds are breached, but the email can get extremely long. I've thought about it in the past and my conclusions have always leaned towards creating an email attachment of these specific outputs (maybe a file for each output), so the email is still readable. I still haven't looked into this, but I'm sure it's possible and it should not be too much work and we can still use parts of this work. What do you think? |
That would be a better option. I have a threshold of 500 files and that was only ever breached by 10 or 20, so the list wasn't too long. This can of course be very different for other situations... However: I have looked a little bit into it: Adding an attachment is not as easily done as just sending a mail.
I am using openmediavault and on my system
So this would require to make sure a specific program, e.g. I am not sure if this doesn't make it too complicated... |
We could also add another option to have the output send in a separate mail. So people can receive a readable standard email and a separate email with the long output, if they prefer that. |
Description
This adds the option to set
VERBOSITY
to2
. Setting this will send a mail with the full diff and touch output when the deleted or updated files threshold has been reached or exceeded and no sync was run because of that. It will trim the log in all other cases.This can be useful if you want to check the list of changed files before running a manual sync every time no automatic sync was run and don't want to bother checking the log via command line.
Type of change
Checklist: