fdocr / martilla

Easy to configure DB backup tool for simple everyday use on UNIX based systems
https://visualcosita.com/martilla-tool-for-db-backups/
MIT License
10 stars 4 forks source link

Metadata duration formatting #21

Closed fdocr closed 4 years ago

fdocr commented 4 years ago

Describe the bug The metadata sent in a notifier sends times above 60s with incorrect format.

To Reproduce Steps to reproduce the behavior:

  1. Backup a DB in a way it will take more than 60s to dump (0.75GB gzipped backup worked for me)
  2. Check notifier metadata (i.e. Slack notifier)

Sample config file

Screen Shot 2019-11-19 at 17 24 52

Expected behavior A format similar to 0h 21m 11s

Environment Please complete the following information

Additional context This might have something to do with rounding float numbers (round up/down as needed) in the lib/martilla/utilities.rb methods.