Adjust update parameters:

-f|--force         Force the update command (Even if the database structure matches)
-o|--override      Override running or stalling updates
This commit is contained in:
Philipp Holzer 2019-02-24 12:24:09 +01:00
parent 7ce549c294
commit aae58815a8
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
8 changed files with 26 additions and 26 deletions

View file

@ -61,11 +61,11 @@ class CacheLockDriver extends AbstractLockDriver
/**
* (@inheritdoc)
*/
public function releaseLock($key, $force = false)
public function releaseLock($key, $override = false)
{
$cachekey = self::getLockKey($key);
if ($force) {
if ($override) {
$this->cache->delete($cachekey);
} else {
$this->cache->compareDelete($cachekey, getmypid());

View file

@ -68,9 +68,9 @@ class DatabaseLockDriver extends AbstractLockDriver
/**
* (@inheritdoc)
*/
public function releaseLock($key, $force = false)
public function releaseLock($key, $override = false)
{
if ($force) {
if ($override) {
$where = ['name' => $key];
} else {
$where = ['name' => $key, 'pid' => $this->pid];

View file

@ -33,12 +33,12 @@ interface ILockDriver
/**
* Releases a lock if it was set by us
*
* @param string $key The Name of the lock
* @param bool $force Force the lock to get released
* @param string $key The Name of the lock
* @param bool $override Overrides the lock to get released
*
* @return void
*/
public function releaseLock($key, $force = false);
public function releaseLock($key, $override = false);
/**
* Releases all lock that were set by us

View file

@ -50,7 +50,7 @@ class SemaphoreLockDriver extends AbstractLockDriver
/**
* (@inheritdoc)
*/
public function releaseLock($key, $force = false)
public function releaseLock($key, $override = false)
{
if (empty(self::$semaphore[$key])) {
return false;