mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
19 lines
514 B
PHP
19 lines
514 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Common\Lock;
|
|
|
|
use Interop\Container\ContainerInterface;
|
|
use Symfony\Component\Lock\Store\RetryTillSaveStore;
|
|
use Symfony\Component\Lock\StoreInterface;
|
|
|
|
class RetryLockStoreDelegatorFactory
|
|
{
|
|
public function __invoke(ContainerInterface $container, $name, callable $callback): RetryTillSaveStore
|
|
{
|
|
/** @var StoreInterface $originalStore */
|
|
$originalStore = $callback();
|
|
return new RetryTillSaveStore($originalStore);
|
|
}
|
|
}
|