Skip to content

Commit

Permalink
fix: add exception handling for database out of space
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Jul 15, 2019
1 parent fdcf138 commit 977517e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lbsntransform/classes/submit_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ def submitBatch(self, insert_sql):
tsuccessful = True
except psycopg2.ProgrammingError as e:
sys.exit(f'{e}\nINSERT SQL WAS: {insert_sql}')
except psycopg2.errors.DiskFull as e:
input("Disk space full. Clean files and continue..")
else:
# self.count_affected += self.dbCursor.rowcount # monitoring
self.db_cursor.execute("RELEASE SAVEPOINT submit_recordBatch")
Expand Down

0 comments on commit 977517e

Please sign in to comment.