Implements Drupal\Core\Queue\QueueInterface::createItem().
Overrides QueueInterface::createItem
public function createItem($data) {
$query = $this->connection
->insert('queue')
->fields(array(
'name' => $this->name,
'data' => serialize($data),
// We cannot rely on REQUEST_TIME because many items might be created
// by a single request which takes longer than 1 second.
'created' => time(),
));
// Return the new serial ID, or FALSE on failure.
return $query
->execute();
}