Commit Graph

21 Commits

Author SHA1 Message Date
Sebastian Goscik
61e54c3b5f Add known download exception 2022-02-21 11:12:19 +00:00
Sebastian Goscik
84cb32fabf Added debug logging of config settings 2022-02-21 11:12:19 +00:00
Sebastian Goscik
773b90ba4f Log camera ID -> name mapping at start
Makes it easier to figure out what the camera IDs are for ignoring them
2022-02-21 11:12:19 +00:00
Sebastian Goscik
0dd9e8e91b Add feature to ignore cameras
Implements #1
2022-02-21 11:12:19 +00:00
Sebastian Goscik
e491965e04 Lookup camera names in pyunifiprotect instead of a local map
Pyunifiprotect should keep the known cameras upto date, unlike the map
we were keeping before which was never updated after start.
2022-02-21 11:12:19 +00:00
Sebastian Goscik
0b1ccca4b2 linter fixes 2022-02-20 23:43:27 +00:00
Sebastian Goscik
3e1868b21f Added a retry delay 2022-02-20 21:33:21 +00:00
Sebastian Goscik
166e4b282b Added down/upload retries
Also improved logging of exception that occur to ensure unexpected exceptions are never passed silently
2022-02-20 21:21:30 +00:00
Sebastian Goscik
a22fa64587 Created custom exception class for rclone errors
Previously it used RuntimeExceptions which could also be raised from other source.
This also meant some exceptions could be passed silently which is no longer the case
2022-02-20 21:00:19 +00:00
Sebastian Goscik
b948c4ceb5 Fix typing and docstrings 2022-02-19 22:03:51 +00:00
Sebastian Goscik
6a0f89ff49 Remove unnecessary attributes
Especially the login credentials
2022-02-19 21:45:03 +00:00
Sebastian Goscik
c7f35cb17e Reduce logging indent to two spaces 2022-02-19 21:44:27 +00:00
Sebastian Goscik
00f1b675b7 Refactor upload into its own method 2022-02-19 21:43:33 +00:00
Sebastian Goscik
d69090ba72 Overhauled logging
- Better logging format
- More information logged
- Ability to show rclone logging
2022-02-19 19:36:31 +00:00
Sebastian Goscik
30557c1d40 Improved download logging
Added much more detail about the captured event
2022-02-19 12:43:53 +00:00
Sebastian Goscik
524a30d0a7 Import order tidy up 2022-02-19 12:03:51 +00:00
Sebastian Goscik
c481810c1e Improved cmd debug logging 2022-02-19 12:03:51 +00:00
Sebastian Goscik
e63c36d100 Removed need for temp files
Download and upload now occur purely from memory
2022-02-19 12:03:51 +00:00
Sebastian Goscik
eebac2386a Fix purge self reference + delete empty directories
The rclone pruge method needed access to self but wasnt called in such a way that it had it.
Previously it would leave empty directories once files were purged. This is no longer the case
by chaining a call to `rclone rmdirs`
2022-02-19 12:02:25 +00:00
Sebastian Goscik
cd96b80097 Initial implementation
- CLI + env var settings
- Backup via rclone
- Configurable retention
- Run purge nightly
- 4 levels of logging
2022-02-19 11:53:22 +00:00
Sebastian Goscik
fe57f626c0 Initial commit 2022-02-18 01:24:02 +00:00