Backend Rails Server Code for Thermal Runaway