Skip to content

Commit

Permalink
Use environment options to create RRActivityInvocationCache (#520)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksei Gagarin <[email protected]>
  • Loading branch information
jmortlock and roxblnfk authored Oct 28, 2024
1 parent 17e3726 commit 14f69e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use React\Promise\PromiseInterface;
use Spiral\Goridge\RPC\RPC;
use Spiral\RoadRunner\Environment;
use Spiral\RoadRunner\KeyValue\Factory;
use Spiral\RoadRunner\KeyValue\StorageInterface;
use Temporal\DataConverter\DataConverter;
Expand All @@ -31,7 +32,8 @@ public function __construct(string $host, string $cacheName, DataConverterInterf

public static function create(DataConverterInterface $dataConverter = null): self
{
return new self('tcp://127.0.0.1:6001', self::CACHE_NAME, $dataConverter);
$env = Environment::fromGlobals();
return new self($env->getRPCAddress(), self::CACHE_NAME, $dataConverter);
}

public function clear(): void
Expand Down

0 comments on commit 14f69e9

Please sign in to comment.