How to skip specific/failed samples on next `-resume`

With nf-core pipelines, I have been utilising the when to skip failing samples.

process {
    ext.when = $ { meta.id !in [ "sample1", "sample2" ] }
}

With process selectors, this can be very powerful and provide granular control. Somewhere, I read that the when block is now deprecated.