mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Adding force to update routine
- Introduced Cache::NEVER Lock (never expiring lock) - Force flag for dbstructure update - Moving the business logic to central place in Update class
This commit is contained in:
parent
f2ec963b95
commit
270e817954
9 changed files with 141 additions and 104 deletions
|
@ -111,12 +111,13 @@ class Lock
|
|||
*
|
||||
* @param string $key Name of the lock
|
||||
* @param integer $timeout Seconds until we give up
|
||||
* @param integer $ttl The Lock lifespan, must be one of the Cache constants
|
||||
*
|
||||
* @return boolean Was the lock successful?
|
||||
*/
|
||||
public static function acquire($key, $timeout = 120)
|
||||
public static function acquire($key, $timeout = 120, $ttl = Cache::FIVE_MINUTES)
|
||||
{
|
||||
return self::getDriver()->acquireLock($key, $timeout);
|
||||
return self::getDriver()->acquireLock($key, $timeout, $ttl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue