Skip to content

Commit

Permalink
fix serialization of rate limited with redis middleware (#35971)
Browse files Browse the repository at this point in the history
Same as f3d4dcb but for RateLimitedWithRedis
  • Loading branch information
chuangbo authored Jan 21, 2021
1 parent d627ce2 commit 7689b36
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Illuminate/Queue/Middleware/RateLimitedWithRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,17 @@ protected function getTimeUntilNextRetry($key)
{
return ($this->decaysAt[$key] - $this->currentTime()) + 3;
}

/**
* Prepare the object after unserialization.
*
* @param array $data
* @return void
*/
public function __unserialize(array $data)
{
parent::__unserialize($data);

$this->redis = Container::getInstance()->make(Redis::class);
}
}

0 comments on commit 7689b36

Please sign in to comment.