Module: tools
Branch: master
Commit: d6e6621472da2d80520fc4f9592a7d87934a141e
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d6e6621472da2d80520fc4f…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Jan 18 03:58:32 2018 +0100
testbot: Purge old jobs based on their Submitted timestamp.
Although it would only happen in case of a major TestBot malfunction,
a Job could end up in a state where it will never complete and thus
where its Ended field never gets set. …
[View More]So deleting old jobs based on
their Ended field could leave us with zombies.
This cannot happen with the Submitted timestamp since that field is not
nullable.
Also, a Job run time is normally very small compared to the expiration
time (under a couple of hours compared to several days) so this does not
make a significant difference in when a job actually gets deleted.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Janitor.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index 6ac22de..0f126e8 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -61,7 +61,7 @@ if ($JobPurgeDays != 0)
my $Jobs = CreateJobs();
foreach my $Job (@{$Jobs->GetItems()})
{
- if (defined($Job->Ended) && $Job->Ended < $DeleteBefore)
+ if ($Job->Submitted < $DeleteBefore)
{
LogMsg "Deleting job ", $Job->Id, "\n";
$Job->RmTree();
[View Less]