for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wandu\Q\Job;
use Aws\Sqs\SqsClient;
use Wandu\Q\Contracts\JobInterface;
class SqsJob implements JobInterface
{
/** @var \Aws\Sqs\SqsClient */
protected $client;
/** @var string */
protected $url;
protected $body;
protected $handle;
/**
* @param \Aws\Sqs\SqsClient $client
* @param string $url
* @param string $handle
* @param string $body
*/
public function __construct(SqsClient $client, $url, $handle, $body)
$this->client = $client;
$this->url = $url;
$this->handle = $handle;
$this->body = $body;
}
* {@inheritdoc}
public function read()
return $this->body;
public function delete()
return $this->client->deleteMessage([
'QueueUrl' => $this->url,
'ReceiptHandle' => $this->handle,
]);