eric-hedengren / database-peak-streaming

Python program that utilizes powerful instruments designed to measure changes in tension on oil platform walls
4 stars 0 forks source link

New Database Fail Safe #7

Open eric-hedengren opened 4 years ago

eric-hedengren commented 4 years ago

If the number of data points written to the database does not match the initial number created, the database will throw an error and data will be lost, potentially large amounts.

Create a new database if the old database throws an error to preserve data.

Or create new tables with different names if the number of peaks change, directly in the loop, every time data is written. This will check if the number of peaks has changed from a simple variable and call a function to create a new table if true.