You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function updateJsonInRedis(RedisClient $Redis, $key, array $array) {
59
59
// Create new Lock instance
60
-
$Lock = new RedisLock($Redis, 'Lock_'.$key, RedisLock::FLAG_CATCH_EXCEPTIONS);
60
+
$Lock = new RedisLock($Redis, 'Lock_'.$key, RedisLock::FLAG_DO_NOT_THROW_EXCEPTIONS);
61
61
62
62
// Acquire lock for 2 sec.
63
63
// If lock has acquired in another thread then we will wait 3 second,
@@ -102,22 +102,22 @@ Create a new instance of RedisLock.
102
102
1. RedisClient **$Redis** - Instanse of [RedisClient](https://github.com/cheprasov/php-redis-client)
103
103
2. string **$key** - name of key in Redis storage. Only locks with the same name will compete with each other for lock.
104
104
3. int **$flags**, default = 0
105
-
*`RedisLock::FLAG_CATCH_EXCEPTIONS` - use this flag, if you don't want catch exceptions by yourself. Do not use this flag, if you want have a full control on situation with locks. Default behavior without this flag - all Exceptions will be thrown.
105
+
*`RedisLock::FLAG_DO_NOT_THROW_EXCEPTIONS` - use this flag, if you don't want catch exceptions by yourself. Do not use this flag, if you want have a full control on situation with locks. Default behavior without this flag - all Exceptions will be thrown.
106
106
107
107
##### Example
108
108
109
109
```php
110
110
$Lock = new RedisLock($Redis, 'lockName');
111
111
// or
112
-
$Lock = new RedisLock($Redis, 'lockName', RedisLock::FLAG_CATCH_EXCEPTIONS);
112
+
$Lock = new RedisLock($Redis, 'lockName', RedisLock::FLAG_DO_NOT_THROW_EXCEPTIONS);
0 commit comments