The city has spent millions on emergency contracts to rebuild its networks after a hack.