public static Mono < Void > waitForCompletion ( CloudFoundryClient cloudFoundryClient , Duration completionTimeout , String jobId ) { return requestJobV3 ( cloudFoundryClient , jobId ) . filter ( job -> JobState . PROCESSING != job . getState ( ) ) . repeatWhenEmpty ( exponentialBackOff ( Duration . ofSeconds ( 1 ) , Duration . ofSeconds ( 15 ) , completionTimeout ) ) . filter ( job -> JobState . FAILED == job . getState ( ) ) . flatMap ( JobUtils :: getError ) ; }
Waits for a job V3 to complete