Update cancellation method for latest Jenkins