Skip to content

Commit

Permalink
clear current event after upload/download
Browse files Browse the repository at this point in the history
  • Loading branch information
ep1cman committed Dec 10, 2022
1 parent f195b8a commit 0c34294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion unifi_protect_backup/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ async def start(self):

await self.upload_queue.put((event, video))
self.logger.debug("Added to upload queue")

self.current_event = None

except Exception as e:
self.logger.warn(f"Unexpected exception occurred, abandoning event {event.id}:")
self.logger.exception(e)
Expand Down
3 changes: 2 additions & 1 deletion unifi_protect_backup/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ async def start(self):
await self._update_database(event, destination)

self.logger.debug(f"Uploaded")

self.current_event = None

except Exception as e:
self.logger.warn(f"Unexpected exception occurred, abandoning event {event.id}:")
self.logger.exception(e)
Expand Down

0 comments on commit 0c34294

Please sign in to comment.