protected function doDelete($receipt, array $logContext = [])
    {
        // ensures that the SQS Queue exist
        if (!$this->queueExists()) {
            $this->createQueue();
        }

        $logContext = array_merge([
            'QueueUrl' => $this->queueUrl
        ], $logContext);

        try {
            $this->getClient()->deleteMessage([
                'QueueUrl' => $this->queueUrl,
                'ReceiptHandle' => $receipt
            ]);

            $this->logDebug('Task deleted from queue.', $logContext);
        } catch (AwsException $e) {
            $this->logError('Deleting task failed with MSG: '. $e->getAwsErrorMessage(), $logContext);
        }
    }
protected function doDelete($receipt, array $logContext = [])
    {
        // ensures that the SQS Queue exist
        if (!$this->queueExists()) {
            $this->createQueue();
        }

        $logContext = array_merge([
            'QueueUrl' => $this->queueUrl
        ], $logContext);

        try {
            $this->getClient()->deleteMessage([
                'QueueUrl' => $this->queueUrl,
                'ReceiptHandle' => $receipt
            ]);

            $this->logDebug('Task deleted from queue.', $logContext);
        } catch (AwsException $e) {
            $this->logError('Deleting task failed with MSG: '. $e->getAwsErrorMessage(), $logContext);
        }
    }
protected function doDelete ( $ receipt , array $ logContext = [ ] ) { // ensures that the SQS Queue exist if ( ! $ this -> queueExists ( ) ) { $ this -> createQueue ( ) ; } $ logContext = array_merge ( [ 'QueueUrl' => $ this -> queueUrl ] , $ logContext ) ; try { $ this -> getClient ( ) -> deleteMessage ( [ 'QueueUrl' => $ this -> queueUrl , 'ReceiptHandle' => $ receipt ] ) ; $ this -> logDebug ( 'Task deleted from queue.' , $ logContext ) ; } catch ( AwsException $ e ) { $ this -> logError ( 'Deleting task failed with MSG: ' . $ e -> getAwsErrorMessage ( ) , $ logContext ) ; } }
Delete a task by its receipt.

@param string $receipt
@param array $logContext
Delete a task by its receipt .