Skip to content

Commit a98ca27

Browse files
committed
Fix SqsJob job name
1 parent ed02adf commit a98ca27

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1818
### Fixed
1919

2020
- Attempts value do not increased after consume
21+
- `SqsJob` job name
2122

2223
## [1.0.0-beta6] - 2025-01-23
2324

src/Job/SqsJob.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ public function __construct(
2020
protected array $awsResult,
2121
protected readonly AwsSqsQueue $queue,
2222
) {
23+
$payload = json_decode($this->awsResult['Body'], true);
24+
2325
parent::__construct(
2426
id: $this->awsResult['MessageId'],
2527
name: $payload['jobName'] ?? null,
2628
attempts: (int)(($this->awsResult['Attributes'] ?? [])['ApproximateReceiveCount'] ?? 0),
27-
payload: json_decode($this->awsResult['Body'], true),
29+
payload: $payload,
2830
);
2931
}
3032

0 commit comments

Comments
 (0)