original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Utility method to create a DB record from an adhoc task.
  
  @param \core\task\adhoc_task $task
  @return \stdClass
docstring_tokens: Utility method to create a DB record from an adhoc task .