How can I kill a task of backup by programation? task->destroy()?

How can I kill a task of backup by programation? task->destroy()?

by Jose Lorenzo Espeso -
Number of replies: 0

Hello Everybody!

I´m developing a plugin into admin->tool,

I´ve a problem to control a task, I want to kill a task when a course size is more than my plugin preference, but when I kill the task I´ve got an error.


Example:


class backup_tool_foobar_plugin extends backup_tool_plugin {

    protected function define_course_plugin_structure() {

     ......

 if ($sizecurso > $topemedida){

            echo "<p>Tamaño del curso mas grande de lo debido</p>";

//             $this->task->destroy();

                $this->task->destroy($this->step->get_task());

               

                

//                 $this->step->destroy();

        }else{

            echo "<p>Tamaño del curso CORRECTO</p>";            

        }

}

 }


Average of ratings: -