The job ahead for new Pittsburgh Mayor Corey O’Connor is to shrink and grow the city at the same time. It is not an impossible task, but it will require toughness. And O’Connor has been dealt a tough hand.

The Peduto administration had a checkered record in the business of running the city. Very large issues were unaddressed, from snow removal to bridge maintenance. One result was the collapse of the Fern Hollow Bridge and the closing of others that we are still living with.

Peduto was followed by Mayor Ed Gainey, who had little experience in running a city, and he immediately surrounded himself with people who had even less. Trapped by the political agendas of his top appointees and political supporters, he was unable to reach out for help from the city’s economic leadership — both public and private — where serious help was available.

Within days of taking office, O’Connor worked out a $10 million gift from UPMC to help purchase much-­needed ambulances, which freed up city money for much-needed snowplows. Essentially, all O’Connor had to do to get that money was ask for it, something that Gainey’s SEIU supporters refused to let him do because they have been battling UPMC over their local’s attempt to represent hospital workers there.

The worst news for O’Connor is that Gainey’s last city operating budget had a $40 million hole in it. O’Connor seemed surprised at the scope of the shortfall, and city council members feigned surprise, too, but no one should have been surprised. City Controller Rachael Heisler has been sounding the alarm over the Gainey budgets for two years, calling the most recent one “not an honest document.”

Heisler issued public statements, held news conferences and took aim at the assorted flim-flams that were used to prop up Gainey’s numbers. As the Tribune-Review recently reported, “To some, Heisler may have seemed like a Pittsburgh Chicken Little,” crying out that the sky was falling. But the sky was in fact falling.

Heisler, with every right to gloat, handled vindication with grace. She told the Tribune-Review, “The reason you put out warnings, though, is not so you can be proven right. The reason you put out warnings is so action can be taken.”

If sheer will and enthusiasm could get the city back on track, O’Connor’s community engagement would do it. He’s everywhere — from tasting food at new restaurants to promoting the city at tech conferences. Together with his pitches to developers, the streamlining of the permitting process and his willingness to talk to everyone, these things can grow the city.

Shrinking the city — identifying places to cut and create efficiencies — will be just as important, but often tougher. O’Connor will start by eliminating unfilled jobs in the budget, but layoffs are the only option after that. And public safety positions are virtually untouchable.

Other areas include affordable vehicle maintenance and replacement schedules, tighter management of everything — but especially overtime and discretionary spending — and cutting years of accumulated waste.

O’Connor has caught a few breaks. The NFL Draft will give him a sales tax windfall. The UPMC gift was followed by a Pittsburgh Foundation grant of $750,000 to defray the cost of the Gainey administration’s questionable comprehensive plan initiative. And city council, although late to recognize the city’s plight, raised city real estate taxes by 20% before O’Connor’s inauguration.

If O’Connor can do these things and address Pittsburgh’s affordable housing crisis — hopefully by rehabbing thousands of city-owned vacant homes and providing incentives for private developers to rehab theirs — he will be on his way.