diff --git a/source/lib/Net/Gearman/Job/HandBrake.class.php b/source/lib/Net/Gearman/Job/HandBrake.class.php index 63cf499..0e80ef3 100644 --- a/source/lib/Net/Gearman/Job/HandBrake.class.php +++ b/source/lib/Net/Gearman/Job/HandBrake.class.php @@ -53,10 +53,10 @@ class Net_Gearman_Job_HandBrake extends Net_Gearman_Job_Common implements Rippin $handbrake_cmd[] = escapeshellarg($value); } $handbrake_cmd = join(' ', $handbrake_cmd); - RippingCluster_LogEntry::debug($log, $this->job->id(), $handbrake_cmd, 'worker'); + RippingCluster_WorkerLogEntry::debug($log, $this->job->id(), $handbrake_cmd); // Change the status of this job to running - RippingCluster_LogEntry::debug($log, $this->job->id(), "Setting status to Running", 'worker'); + RippingCluster_WorkerLogEntry::debug($log, $this->job->id(), "Setting status to Running"); $this->job->updateStatus(RippingCluster_JobStatus::RUNNING, 0); list($return_val, $stdout, $stderr) = RippingCluster_ForegroundTask::execute($handbrake_cmd, null, null, null, array($this, 'callbackOutput'), array($this, 'callbackOutput'), $this); @@ -110,7 +110,7 @@ class Net_Gearman_Job_HandBrake extends Net_Gearman_Job_Common implements Rippin $this->status($matches[1], 100); } else { $log = RippingCluster_Main::instance()->log(); - RippingCluster_LogEntry::debug($log, $rip->job->id(), $line, 'worker'); + RippingCluster_WorkerLogEntry::debug($log, $rip->job->id(), $line); } } } diff --git a/source/lib/RippingCluster/Worker.class.php b/source/lib/RippingCluster/Worker.class.php index 7ca0fe2..2a7a491 100644 --- a/source/lib/RippingCluster/Worker.class.php +++ b/source/lib/RippingCluster/Worker.class.php @@ -30,7 +30,8 @@ class RippingCluster_Worker { try { $this->gearman->beginWork(); } catch (Net_Gearman_Exception $e) { - // Do stuff + RippingCluster_WorkerLogEntry::error(SihnonFramework_Main::instance()->log(), 0, $e->toText()); + return false; } return true;