public function run($workload, TaskWrapper $task)
    {
        $result = false;
        $this->id = $task->getId();
        $this->name = $task->getName();

        try {
            if (false !== $this->beforeRun($workload, $task)) {
                $result = $this->doRun($workload, $task);

                $this->afterRun($result);
            }
        } catch (\Exception $e) {
            $this->onException($e);
        }

        return $result;
    }
public function run($workload, TaskWrapper $task)
    {
        $result = false;
        $this->id = $task->getId();
        $this->name = $task->getName();

        try {
            if (false !== $this->beforeRun($workload, $task)) {
                $result = $this->doRun($workload, $task);

                $this->afterRun($result);
            }
        } catch (\Exception $e) {
            $this->onException($e);
        }

        return $result;
    }
public function run ( $ workload , TaskWrapper $ task ) { $ result = false ; $ this -> id = $ task -> getId ( ) ; $ this -> name = $ task -> getName ( ) ; try { if ( false !== $ this -> beforeRun ( $ workload , $ task ) ) { $ result = $ this -> doRun ( $ workload , $ task ) ; $ this -> afterRun ( $ result ) ; } } catch ( \ Exception $ e ) { $ this -> onException ( $ e ) ; } return $ result ; }
do the job
@param string $workload
@param TaskWrapper $task
@return mixed
do the job