lava_rpc_connector.py: block_wait_for_jobs: Don't requery finished jobs

Previously, all finished jobs were re-queried from LAVA again and again,
which put undue load on the LAVA server and likely slowed down the build
itself.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I58a7eb2735c22df9d306b885977eb85e3b17f7eb
diff --git a/tfm_ci_pylib/lava_rpc_connector.py b/tfm_ci_pylib/lava_rpc_connector.py
index d07a58d..de940bd 100644
--- a/tfm_ci_pylib/lava_rpc_connector.py
+++ b/tfm_ci_pylib/lava_rpc_connector.py
@@ -242,6 +242,8 @@
                 print("Breaking because of timeout")
                 break
             for job_id in job_ids:
+                if job_id in finished_jobs:
+                    continue
                 # Check if the job is not running
                 cur_status = self.get_job_info(job_id)
                 # If in queue or running wait