public function fail()
    {
        $this->finished = true;
        if (!count($this->callback[self::TASK_FAIL])) {
            return;
        }

        foreach ($this->callback[self::TASK_FAIL] as $callback) {
            call_user_func($callback, $this);
        }
    }
public function fail()
    {
        $this->finished = true;
        if (!count($this->callback[self::TASK_FAIL])) {
            return;
        }

        foreach ($this->callback[self::TASK_FAIL] as $callback) {
            call_user_func($callback, $this);
        }
    }
public function fail ( ) { $ this -> finished = true ; if ( ! count ( $ this -> callback [ self :: TASK_FAIL ] ) ) { return ; } foreach ( $ this -> callback [ self :: TASK_FAIL ] as $ callback ) { call_user_func ( $ callback , $ this ) ; } }
Run the failure callbacks.

Failure callbacks are passed the task object job that failed

@see \MHlavac\Gearman\Task::attachCallback()
Run the failure callbacks .