Skip to content

pixelfederation/phystrix-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phystrix Redis State Storage

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