Ex-mayor gets 8 years in prison for corruption scheme