Francois Gouget : testbot/web: Simplify JobDetailsPage::GeneratePage().
Alexandre Julliard
julliard at winehq.org
Wed Mar 7 15:05:41 CST 2018
Module: tools
Branch: master
Commit: a18eff576ab47fb50cc5ac43af79323f760e5a94
URL: https://source.winehq.org/git/tools.git/?a=commit;h=a18eff576ab47fb50cc5ac43af79323f760e5a94
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Wed Mar 7 13:31:33 2018 +0100
testbot/web: Simplify JobDetailsPage::GeneratePage().
The JobDetailsPage collection contains StepTasks, not Jobs!
But there is no need to inspect the Status of each of the Job's Tasks to
know whether it's worth reloading the page: they are all summarized in
the Job Status. So just check if the Job is still running.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/JobDetails.pl | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 923ef97..c8ecb4c 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -219,13 +219,9 @@ sub GeneratePage($)
{
my ($self) = @_;
- foreach my $Job (@{$self->{Collection}->GetItems()})
+ if ($self->{Job}->Status =~ /^(queued|running)$/)
{
- if ($Job->Status eq "queued" || $Job->Status eq "running")
- {
- $self->{Request}->headers_out->add("Refresh", "30");
- last;
- }
+ $self->{Request}->headers_out->add("Refresh", "30");
}
$self->SUPER::GeneratePage();
More information about the wine-cvs
mailing list