function computing_load in Drupal Computing 7.2
Load a computing entity by id; returns the object. Input/Output will be loaded as object, not as json encoded strings.
Parameters
$id int computing record id.:
Return value
object the computing entity or false if not exist.
6 calls to computing_load()
- ComputingQueue::deleteItem in ./
computing.queue.inc - Delete a finished item from the queue.
- computing_claim in ./
computing.module - Return an object and mark it as being processed. Use lock system to make sure status is not changed during the process. Another approach is to use while(TRUE) following the logic from SystemQueue:claimItem().
- computing_finish in ./
computing.module - When agent finishes a computational task, call this function to persist results back to Drupal.
- computing_last_success in ./
computing.module - Return the record that has run successfully most recently.
- computing_release in ./
computing.module - Release the claimed record, assuming that the record is claimed by the
1 string reference to 'computing_load'
- computing_services_resources in ./
computing.services.inc - Implements hook_services_resources().
File
- ./
computing.module, line 205
Code
function computing_load($id) {
$record = entity_load_single('computing_record', $id);
if (!empty($record->input)) {
$record->input = drupal_json_decode($record->input);
}
if (!empty($record->output)) {
$record->output = drupal_json_decode($record->output);
}
return $record;
}