File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ The format is based on [Keep a Changelog][keepachangelog] and this project adher
1818- Tasks were stuck in case of an error, the "release" method did not return them to the queue.
1919- The "calculateBackoff" method incorrectly took the index "$job->attempts()"
2020- The "withHeader" method of the "\Spiral\RoadRunner\Jobs\Task\WritableHeadersInterface" interface expects the type "string|iterable", "int" is passed
21+ - Fixed the ` $ttl ` in the ` increment ` method
22+ - The ` forever ` method passed ` $seconds ` as 0, ` Spiral\RoadRunner\KeyValue ` summed ` timestamp + 0 ` , and ` forever ` was not ` forever `
2123
2224[ #147 ] :https://github.com/roadrunner-php/laravel-bridge/issues/147
2325
Original file line number Diff line number Diff line change @@ -60,11 +60,12 @@ public function putMany(array $values, $seconds)
6060
6161 public function increment ($ key , $ value = 1 )
6262 {
63- $ data = $ this ->get ($ this -> prefix . $ key );
63+ $ data = $ this ->get ($ key );
6464
6565 return tap (((int ) $ data ) + $ value , function ($ newValue ) use ($ key ): void {
6666 $ ttl = $ this ->storage ->getTtl ($ this ->prefix . $ key );
67- $ this ->storage ->set ($ key , $ newValue , $ ttl ->diff (new \DateTimeImmutable ()));
67+
68+ $ this ->put ($ key , $ newValue , ($ ttl ? $ ttl ->diff (new \DateTimeImmutable ()) : null ));
6869 });
6970 }
7071
@@ -75,7 +76,7 @@ public function decrement($key, $value = 1)
7576
7677 public function forever ($ key , $ value )
7778 {
78- return $ this ->put ($ key , $ value , 0 );
79+ return $ this ->put ($ key , $ value , null );
7980 }
8081
8182 public function forget ($ key )
You can’t perform that action at this time.
0 commit comments