From 6a18a3d65bec78ae5ef7d846e198d035dcdbc486 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 3 Jun 2014 22:18:47 +0100 Subject: [PATCH] Store started timestamp on job completion --- Netdisco/Changes | 1 + Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 4b8cc8f0..d41def76 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -10,6 +10,7 @@ * Fix for device counts in VLAN Inventory report * Forward port housekeeping/schedule and expiry/expire legacy config + * Store started timestamp on job completion 2.027007 - 2014-05-27 diff --git a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm index f8f81a69..545eb451 100644 --- a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -150,7 +150,7 @@ sub jq_defer { schema('netdisco')->txn_do(sub { schema('netdisco')->resultset('Admin') ->find($job->id, {for => 'update'}) - ->update({ status => 'queued' }); + ->update({ status => 'queued', started => undef }); }); $happy = true; }; @@ -169,6 +169,7 @@ sub jq_complete { ->find($job->id, {for => 'update'})->update({ status => $job->status, log => $job->log, + started => $job->started, finished => $job->finished, }); });