Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set correct queue name from sqs job event #139

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": "^8.0",
"aws/aws-sdk-php": "^3.222",
"bref/bref": "^2.0",
"bref/bref": "^2.1.8",
"illuminate/container": "^8.0 || ^9.0 || ^10.0",
"illuminate/contracts": "^8.0 || ^9.0 || ^10.0",
"illuminate/http": "^8.0 || ^9.0 || ^10.0",
Expand Down
10 changes: 1 addition & 9 deletions src/Queue/QueueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ class QueueHandler extends SqsHandler
*/
protected const JOB_TIMEOUT_SAFETY_MARGIN = 1.0;

/**
* The name of the SQS queue.
*
* @var string
*/
protected string $queueName;

/**
* Creates a new SQS queue handler instance.
*
Expand All @@ -66,7 +59,6 @@ public function __construct(
throw new RuntimeException('Default queue connection is not a SQS connection');
}

$this->queueName = $queue->getQueue(null);
$this->sqs = $queue->getSqs();
}

Expand Down Expand Up @@ -124,7 +116,7 @@ protected function marshalJob(SqsRecord $sqsRecord): SqsJob
$this->sqs,
$message,
$this->connection,
$this->queueName,
$sqsRecord->getQueueName(),
);
}

Expand Down