How to use prevent overlapping jobs? DistributedMutex?

I think I am doing the same as https://review.discourse.org/t/feature-allow-post-process-mutex-to-be-held-longer/5017 and https://review.discourse.org/t/fix-post-and-topic-creation-race-condition/5247, with the exception of using curly braces instead of do/end, but I don’t think that matters.

DistributedMutex.synchronize(“custom_digest”, validity: 180.minutes) {
do_stuff
}

Yet do_stuff is running multiple times concurrently, and well within the 180 minutes.