gitlab-ci: Add sleep for every `scheduler.jobs.logs` call

Add a time.sleep call between proxy.scheduler.jobs.logs calls, since
they do not block. This will relieve some request pressure on LAVA
dispatchers.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12797>
This commit is contained in:
Guilherme Gallo 2021-09-03 21:59:12 -03:00 committed by Marge Bot
parent 45801e1ecc
commit 2587fa1570
1 changed files with 5 additions and 0 deletions

View File

@ -223,6 +223,11 @@ def follow_job_execution(proxy, job_id):
line_count += len(logs)
# `proxy.scheduler.jobs.logs` does not block, even when there is no
# new log to be fetched. To avoid dosing the LAVA dispatcher
# machine, let's add a sleep to save them some stamina.
time.sleep(5)
def show_job_data(proxy, job_id):
show = _call_proxy(proxy.scheduler.jobs.show, job_id)