Sunil Mohan Adapa a022eed0eb
backups: Show notification on error during scheduled backups
- Keep a count of number of consecutive failures. Reset the count on a
successful backup.

- Keep the count for each repository.

Tests performed:

- Insert an exception into method for running a scheduled backup.

- When the FreedomBox is run in develop mode, it attempts to take backups every
3 minutes.

- It fails and shows the notification. Text is good. The error count is 1 and
error text is same as exception text. Go to backups button redirects to backup
page.

- In another 3 minutes another attempt is made and count increments this time.

- If the notification is dismissed, after another attempt is made, notification
comes back with incremented count.

- When the exception is removed and FreedomBox is restarted, schedule backup
succeeds and notification is dismissed automatically.

- When backup is deleted and exception is reintroduced, the notification comes
back with count reset to 1.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-01-21 20:59:48 -05:00
..
2021-01-21 20:55:27 -05:00
2020-02-19 14:38:55 +02:00
2021-01-21 20:55:27 -05:00
2020-02-19 14:38:55 +02:00
2021-01-21 20:55:27 -05:00