Updated tests

This commit is contained in:
Alejandro Celaya
2019-07-20 12:11:07 +02:00
parent f28540a53e
commit a1c7e7d5da
3 changed files with 81 additions and 5 deletions

View File

@@ -35,9 +35,7 @@ class GeolocationDbUpdater implements GeolocationDbUpdaterInterface
public function checkDbUpdate(callable $mustBeUpdated = null, callable $handleProgress = null): void
{
$lock = $this->locker->createLock(self::LOCK_NAME);
if (! $lock->acquire()) {
return;
}
$lock->acquire(true); // Block until lock is released
try {
$meta = $this->geoLiteDbReader->metadata();