lightblue-platform / lightblue-migrator

GNU General Public License v3.0
3 stars 13 forks source link

Update timestampInitialValue in the same try-catch block as generated jobs insertion #391

Closed paterczm closed 8 years ago

paterczm commented 8 years ago

It is possible for job insertion to fail but timestampInitialValue update to succeed. As a result, some generated jobs may be missing and data for those periods will not be checked for consistency. Those cases are not easy to catch.

To fix this, I'm putting timestampInitialValue update in the same try-catch block as generated jobs insertion. It is still possible that timestampInitialValue update fails after successful job insertion, resulting in job duplicates, but that's better than missing jobs.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 67.908% when pulling 84235aa31009ac2888cac5372a4353fadac19bf9 on ccex into d861ccfbdf9f51f409492cc95c1e0cd66266f548 on master.