I'm glad he's feeling better. My male is unable to express his anal glands by himself, so when I notice him scooting, I take him into the vet immediately. His haven't ever gotten to the point where they are swollen...
But my mom's shih-tzu had one explode and it was a gaping hole by her bum
She had to go on antibiotics and it finally healed up. It is just something you have to keep an eye on and know the signs.