diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2023-05-02 20:16:29 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2023-05-02 20:16:29 +0200 |
commit | 713083e989659d3768f70be195ca3d7327c2214a (patch) | |
tree | d16400c314a4031896421b3ac4046eb212b4102d | |
parent | 3b8003c5a58629ca1347577c253edd63273e1f00 (diff) |
The session needs to be rolled back after an error before we're able to
start a new transaction.
-rw-r--r-- | fbin-scanner.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fbin-scanner.py b/fbin-scanner.py index 3dac420..0c343d9 100644 --- a/fbin-scanner.py +++ b/fbin-scanner.py @@ -143,6 +143,7 @@ def poll_loop(): # On errors, log the exception and retry. Don't update 'now' so that we will retry with the same files. # This tends to happen eg. when we process a file but it's been deleted when we try to update it. logger.exception('Error while processing files') + db.session.rollback() time.sleep(60) |