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

Add backup duration variable to send-after hook #371

Open
MexHigh opened this issue Jun 22, 2024 · 0 comments
Open

Add backup duration variable to send-after hook #371

MexHigh opened this issue Jun 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@MexHigh
Copy link

MexHigh commented Jun 22, 2024

It would be super useful to have a variable that holds the time of how long the backup took in the senf-after and send-after-fail hooks. Maybe something like this with ${BACKUP_DURATION}?:

base:
  backup:
    send-after:
      method: POST
      url: https://example.com/message
      body: "title=Profile ${PROFILE_NAME} ${PROFILE_COMMAND} success&message=Backup took: ${BACKUP_DURATION}"
      headers:
        - name: "Content-Type"
          value: "application/x-www-form-urlencoded"
    send-after-fail:
      method: POST
      url: https://example.com/message
      body: "title=Profile ${PROFILE_NAME} ${PROFILE_COMMAND} failed&message=${ERROR}\n\n${ERROR_STDERR}\n\nTook: ${BACKUP_DURATION}"
      headers:
        - name: "Content-Type"
          value: "application/x-www-form-urlencoded"
...
@creativeprojects creativeprojects added the enhancement New feature or request label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants