/**
  * Sends and delivers a message.
  *
  * @param boolean|null $success
  */
 public function sendAndDeliver($success = true)
 {
     try {
         $message = $this->popMessageInternalWorker->pop();
     } catch (EmptyQueueInternalException $e) {
         return;
     }
     $this->logDeliveryOperationApiWorker->log($message['message'], $success ? 'Delivered' : 'Not Delivered', time());
 }
 /**
  * @param Request $request
  *
  * @return Response
  */
 public function logAction(Request $request)
 {
     $this->logDeliveryOperationApiWorker->log($request->get('REFERENCE'), $request->get('STATUS'), $request->get('TIMESTAMP'));
     return new Response();
 }