You are here

function message_entity_delete_queue_worker in Message 7

Queue API worker; Process a queue item.

The item holds the fields information(field name, column, id and cardinality), the last Message ID we processed and the range.

1 string reference to 'message_entity_delete_queue_worker'
message_cron_queue_info in ./message.module
Implements hook_cron_queue_info().

File

./message.module, line 1151
API functions to manipulate messages.

Code

function message_entity_delete_queue_worker($data) {
  extract($data);
  if (!($mid = _message_delete_messages($field_names, $entity_id, $last_mid, $range))) {
    return;
  }
  $data = array(
    'range' => 200,
    'last_mid' => $mid,
    'field_names' => $field_names,
    'entity_id' => $entity_id,
  );
  $queue = DrupalQueue::get('message_entity_delete');
  return $queue
    ->createItem($data);
}