Either way, it is known how much gas is available. It can also be estimated fairly reliably how much gas will be used a couple of days in advance, given the weather forecast. Therefore a gas shortage will be known in advance, and contingency measures will be taken, both for gas and electricity.