Electricity goes out while roasting

What is the solution when the electricity goes out while roasting?
What should we do with the machine?
What is the solution to cool it down?

the machine uses such little power during cool down that you could power it off almost any UPS or AC/battery option.