From patchwork Wed Jul 18 01:33:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 10106 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F394123E2F for ; Wed, 18 Jul 2012 01:33:15 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id ACC4AA183E6 for ; Wed, 18 Jul 2012 01:33:15 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1192400ggn.11 for ; Tue, 17 Jul 2012 18:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=RXMCAylHPXwasL7J+7dqVbqt3sQB8GPzXOLBtDmuo+Y=; b=VsJX2a3lprPnnStWIINpDVXf58bYbs8bVvOSyk6n/Z++FRAQc1xo1nKluw+3s4FBDX vCvkMxzFEWnvtHMbYrJXSRh95uQF2UoLTqUHQbYdOs3FXIzpMUWaEbb0Sh6j790yN7Zg GsZN+ji7co6rk1Qrw3D1QsKIoUCSBnObfizdXlbHIVC6hVFmLxld85lewXoVu8ysOaWj FSqy4AWRUUuGXLyF/71ss1D2XINaWC6lau1FUWIgWmBBPVFqRCqL8/QJ596dLrMVtm4u WjJI0QQ3Hi/LuL8V3PA0SI4QNZulNc6BoT6fB0QaKrXFKtRt2VTBlNzmgI+5FD6kiOoi xUgQ== Received: by 10.50.40.193 with SMTP id z1mr588713igk.0.1342575194959; Tue, 17 Jul 2012 18:33:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp26193ibb; Tue, 17 Jul 2012 18:33:13 -0700 (PDT) Received: by 10.180.91.1 with SMTP id ca1mr2135535wib.8.1342575193226; Tue, 17 Jul 2012 18:33:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id a4si34571064wie.23.2012.07.17.18.33.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 18:33:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SrJ8a-0000mT-Js for ; Wed, 18 Jul 2012 01:33:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 86379E0149 for ; Wed, 18 Jul 2012 01:33:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 198 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 198: add a report for the 5 longest running jobs Message-Id: <20120718013312.13471.43593.launchpad@ackee.canonical.com> Date: Wed, 18 Jul 2012 01:33:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15637"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: a379079302532ff90f6ea949c6cfd6eb596c4015 X-Gm-Message-State: ALoCoQmTfaOGKlDC/hlkCWtzU/U6FuFCZrSVfWVAjq1gElNl3oDopXUFYD3WtDerVgAChBnGh0gP Merge authors: Andy Doan (doanac) Related merge proposals: https://code.launchpad.net/~doanac/lava-scheduler/5-longest-jobs/+merge/115422 proposed by: Andy Doan (doanac) ------------------------------------------------------------ revno: 198 [merge] committer: Andy Doan branch nick: lava-scheduler timestamp: Tue 2012-07-17 17:31:03 -0500 message: add a report for the 5 longest running jobs modified: lava_scheduler_app/templates/lava_scheduler_app/reports.html lava_scheduler_app/views.py --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'lava_scheduler_app/templates/lava_scheduler_app/reports.html' --- lava_scheduler_app/templates/lava_scheduler_app/reports.html 2012-06-16 03:48:18 +0000 +++ lava_scheduler_app/templates/lava_scheduler_app/reports.html 2012-07-17 22:20:10 +0000 @@ -142,4 +142,15 @@ +

Longest Running Jobs

+{% if long_running|length_is:"0" %} +There are no running jobs. +{% else %} +
    +{% for job in long_running %} +
  • {{job.id}}: {{job.start_time}}
  • +{% endfor %} +
+{% endif %} + {% endblock %} === modified file 'lava_scheduler_app/views.py' --- lava_scheduler_app/views.py 2012-06-26 01:49:31 +0000 +++ lava_scheduler_app/views.py 2012-07-17 19:15:14 +0000 @@ -232,6 +232,11 @@ for week in reversed(range(10)): health_week_report.append(job_report(week*-7-7, week*-7, True)) job_week_report.append(job_report(week*-7-7, week*-7, False)) + + long_running = TestJob.objects.filter( + status__in = [TestJob.RUNNING, TestJob.CANCELING] + ).order_by('start_time')[:5] + return render_to_response( "lava_scheduler_app/reports.html", { @@ -239,6 +244,7 @@ 'health_day_report': health_day_report, 'job_week_report': job_week_report, 'job_day_report': job_day_report, + 'long_running': long_running, 'bread_crumb_trail': BreadCrumbTrail.leading_to(index), }, RequestContext(request))