Improve functions for waiting jobs within same gerrit trigger

Change-Id: I98dd8c69522e061262aa5277c204bda23665364f
Related-Prod: PROD-25788 (PROD:25788)
1 file changed