Skip to content

Commit 0fd2344

Browse files
authored
Merge branch 'master' into master
2 parents 1aa2969 + c8a9cd6 commit 0fd2344

File tree

3 files changed

+9
-32
lines changed

3 files changed

+9
-32
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7-
## UNRELEASED
8-
97
### Added
108

119
- gRPC client support
1210

11+
## Unreleased
12+
1313
### Fixed
1414

15+
- Check pipeline stats on message push [#147]
16+
- Edit the $ttl calculation for the RoadRunnerStore, the time calculation takes place inside the spiral/roadrunner-kv package
1517
- Tasks were stuck in case of an error, the "release" method did not return them to the queue.
1618
- The "calculateBackoff" method incorrectly took the index "$job->attempts()"
1719
- The "withHeader" method of the "\Spiral\RoadRunner\Jobs\Task\WritableHeadersInterface" interface expects the type "string|iterable", "int" is passed
1820

21+
[#147]:https://github.com/roadrunner-php/laravel-bridge/issues/147
22+
1923
## v5.12.0
2024

2125
### Added

src/Cache/RoadRunnerStore.php

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66

77
use Illuminate\Cache\TaggableStore;
88
use Illuminate\Contracts\Cache\LockProvider;
9-
use Illuminate\Support\InteractsWithTime;
109
use Spiral\RoadRunner\KeyValue\StorageInterface;
1110

1211
final class RoadRunnerStore extends TaggableStore implements LockProvider
1312
{
14-
use InteractsWithTime;
15-
1613
public function __construct(private StorageInterface $storage, private string $prefix = '') {}
1714

1815
public function get($key)
@@ -39,7 +36,7 @@ public function many(array $keys)
3936

4037
public function put($key, $value, $seconds)
4138
{
42-
return $this->storage->set($this->prefix . $key, $value, $this->calculateExpiration($seconds));
39+
return $this->storage->set($this->prefix . $key, $value, $seconds);
4340
}
4441

4542
public function putMany(array $values, $seconds)
@@ -52,7 +49,7 @@ public function putMany(array $values, $seconds)
5249

5350
return $this->storage->setMultiple(
5451
$prefixedValues,
55-
$this->calculateExpiration($seconds),
52+
$seconds,
5653
);
5754
}
5855

@@ -90,28 +87,4 @@ public function getPrefix()
9087
{
9188
return $this->prefix;
9289
}
93-
94-
/**
95-
* Set the cache key prefix.
96-
*/
97-
public function setPrefix(string $prefix): void
98-
{
99-
$this->prefix = !empty($prefix) ? $prefix . ':' : '';
100-
}
101-
102-
/**
103-
* Get the expiration time of the key.
104-
*/
105-
protected function calculateExpiration(int $seconds): int
106-
{
107-
return $this->toTimestamp($seconds);
108-
}
109-
110-
/**
111-
* Get the UNIX timestamp for the given number of seconds.
112-
*/
113-
protected function toTimestamp(int $seconds): int
114-
{
115-
return $seconds > 0 ? $this->availableAt($seconds) : 0;
116-
}
11790
}

src/Queue/RoadRunnerQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private function getStats(?string $queue = null): Stat
120120

121121
/** @var Stat $stat */
122122
foreach ($stats as $stat) {
123-
if ($stat->getQueue() === $queue) {
123+
if ($stat->getPipeline() === $queue) {
124124
return $stat;
125125
}
126126
}

0 commit comments

Comments
 (0)