pixelfederation/phystrix-redis

Redis storage implementation for Phystrix (https://github.com/upwork/phystrix)

Installs: 1 557

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 8

Forks: 3

Open Issues: 0

pkg:composer/pixelfederation/phystrix-redis

1.0.2 2020-09-02 12:33 UTC

This package is auto-updated.

Last update: 2025-09-29 02:06:35 UTC


README

Redis storage implementation for Phystrix (https://github.com/upwork/phystrix) It uses the predis/predis package.

Usage

Require redis state storage library:

composer require pixelfederation/phystrix-redis

Create new instance of \PixelFederation\Phystrix\Storage\RedisStateStorage and inject to \Odesk\Phystrix\CommandMetricsFactory and \Odesk\Phystrix\CircuitBreakerFactory

Usage with Symfony Framework

Install Redis Bundle

Install Phystrix Bundle and override state storage configuration:

# services.yml
services:
    PixelFederation\Phystrix\Storage\RedisStateStorage:
        arguments:
            - '@snc_redis.cache'

    phystrix.state_storage:
        alias: PixelFederation\Phystrix\Storage\RedisStateStorage