public function processItem($data) {
    $config = $this->config->get('social_lets_connect_usage.settings');
    $usage_data_url = $config->get('url');

    try {
      $response = $this->client->post($usage_data_url, ['json' => $data]);
    }
    catch (RequestException $e) {
      return FALSE;
    }
    return Json::decode($response->getBody()->getContents());
  }
public function processItem($data) {
    $config = $this->config->get('social_lets_connect_usage.settings');
    $usage_data_url = $config->get('url');

    try {
      $response = $this->client->post($usage_data_url, ['json' => $data]);
    }
    catch (RequestException $e) {
      return FALSE;
    }
    return Json::decode($response->getBody()->getContents());
  }
public function processItem ( $ data ) { $ config = $ this -> config -> get ( 'social_lets_connect_usage.settings' ) ; $ usage_data_url = $ config -> get ( 'url' ) ; try { $ response = $ this -> client -> post ( $ usage_data_url , [ 'json' => $ data ] ) ; } catch ( RequestException $ e ) { return FALSE ; } return Json :: decode ( $ response -> getBody ( ) -> getContents ( ) ) ; }
Will process a queue item.

$send_data['site_key'] = $site_key;
$send_data['send_info'] = [
'last_send' => $last_send,
'times_send' => $times_send,
'current_time' => $current_time,
];
$send_data['usage_data'] = array $usage_data;
Will process a queue item .