From 5a5c3438c1800f0e36b193bf8d0aed0a31f90270 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 25 Apr 2011 01:19:18 +0100 Subject: [PATCH] Updated client side logging and attempt to include proper job_id --- webui/run-jobs.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webui/run-jobs.php b/webui/run-jobs.php index 623dec6..047e2c8 100644 --- a/webui/run-jobs.php +++ b/webui/run-jobs.php @@ -45,19 +45,20 @@ function gearman_complete($method, $handle, $result) { $main = RippingCluster_Main::instance(); $log = $main->log(); - /*$log->info("Job Complete", $job->id());*/ - RippingCluster_LogEntry::info($log, 'Job complete', 'batch'); + $job = RippingCluster_Job::fromId($result['id']); + $job->updateStatus(RippingCluster_JobStatus::COMPLETE); + + RippingCluster_ClientLogEntry::info($log, $job->id(), 'Job complete'); } function gearman_fail($task) { $main = RippingCluster_Main::instance(); $log = $main->log(); - /*$job = RippingCluster_Job::fromId($gearman_task->unique()); + $job = RippingCluster_Job::fromId($task->args['rip_options']['id']); $job->updateStatus(RippingCluster_JobStatus::FAILED); - $log->info("Job Failed", $job->id());*/ - RippingCluster_LogEntry::info($log, 'Job failed', 'batch'); + RippingCluster_ClientLogEntry::info($log, $job->id(), 'Job failed'); }