public static function record_from_adhoc_task($task) {
        $record = new \stdClass();
        $record->classname = self::get_canonical_class_name($task);
        $record->id = $task->get_id();
        $record->component = $task->get_component();
        $record->blocking = $task->is_blocking();
        $record->nextruntime = $task->get_next_run_time();
        $record->faildelay = $task->get_fail_delay();
        $record->customdata = $task->get_custom_data_as_string();
        $record->userid = $task->get_userid();

        return $record;
    }
public static function record_from_adhoc_task($task) {
        $record = new \stdClass();
        $record->classname = self::get_canonical_class_name($task);
        $record->id = $task->get_id();
        $record->component = $task->get_component();
        $record->blocking = $task->is_blocking();
        $record->nextruntime = $task->get_next_run_time();
        $record->faildelay = $task->get_fail_delay();
        $record->customdata = $task->get_custom_data_as_string();
        $record->userid = $task->get_userid();

        return $record;
    }
public static function record_from_adhoc_task ( $ task ) { $ record = new \ stdClass ( ) ; $ record -> classname = self :: get_canonical_class_name ( $ task ) ; $ record -> id = $ task -> get_id ( ) ; $ record -> component = $ task -> get_component ( ) ; $ record -> blocking = $ task -> is_blocking ( ) ; $ record -> nextruntime = $ task -> get_next_run_time ( ) ; $ record -> faildelay = $ task -> get_fail_delay ( ) ; $ record -> customdata = $ task -> get_custom_data_as_string ( ) ; $ record -> userid = $ task -> get_userid ( ) ; return $ record ; }
Utility method to create a DB record from an adhoc task.

@param \core\task\adhoc_task $task
@return \stdClass
Utility method to create a DB record from an adhoc task .