Been there; done that. I wasn't trying to ride a bike a zillion miles, just trying to cut the grass on a hillside. Fortunately, my cardiologist saw the possibility years before, so I carry a defibrillator around in my chest 24/7. And in case you're wondering, getting shocked hurts like a sonofabitch!
I’ve had two cardioversions, a cardiac catheter, and a quad by-pass..............
That’s a kind of pacemaker right?
Amazing how those have improved over time, now they are so small and long lasting.