Data rescue pipeline improvement
The actual data rescue pipeline based on the idea that a i always have the time of the last collection saved in the transductor, every time i try to collect data and fail the transductor is setted as broken, and every time a collection is made in a broken transductor i update trigger the data rescue method between the last collection and now, and update the time of the last collection in the transductor. this strategy is flawed because the the last collection time is updated before the data rescue ends so if a for any reason the data rescue fails all data in that interval is lost.
to solve this we came up with another pipeline for the data rescue: it will be created a cron for the data rescue, the transductor will only save the data relative to the last data rescued, the idea is that this cron will try to rescue data from the last data rescue time util the actual time for each minute, and for each answer it will verify if that measurement was already collected(if exists in the db) save if it does not and update the last collection time.
some key points of this new pipeline is that the time saved in the transductor can only be updated when a valid measurement is collected through the data rescue with time greater than the saved, and that if at any point the system realizes that the transductor's(the electronic component) time is wrong the time should be fixed and the mass memory must be reset.