[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 27/60] sg-report-host-history: Write cache entry for unfinished jobs
We have to also check ->{finished}, rather than the existence of a row at all, since now unfinished jobs can appear in the cache. Because the cache key includes the job status, when the job becomes finished the cache entry will be invalidated. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- sg-report-host-history | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sg-report-host-history b/sg-report-host-history index 2ad2134d..6bf14aa2 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -214,7 +214,8 @@ END cache_row_lookup_prep(\$jr); my $endedrow = cacheable_query($endedq, $jr, 'e'); - if (!$endedrow) { + if (!defined $endedrow->{finished}) { + cache_write_entry(\*H, $jr); #print DEBUG "no-finished\n"; next; } -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |