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:
Philipp Holzer
2018-10-29 10:16:07 +01:00
parent f2ec963b95
commit 270e817954
9 changed files with 141 additions and 104 deletions

View File

@@ -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);
}
/**