From 89a9d35d90b7264d66411dfefec0aa84491d5cf9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 10 Apr 2018 18:30:43 +0200 Subject: dont keep shared database locks when running cli scripts For cli scripts we don't have the assumption that the universe will be cleaned up soon Signed-off-by: Robin Appelman --- lib/private/Server.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/private/Server.php') diff --git a/lib/private/Server.php b/lib/private/Server.php index 109fb002ce5..fd32b09033e 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -847,7 +847,13 @@ class Server extends ServerContainer implements IServerContainer { if (!($memcache instanceof \OC\Memcache\NullCache)) { return new MemcacheLockingProvider($memcache, $ttl); } - return new DBLockingProvider($c->getDatabaseConnection(), $c->getLogger(), new TimeFactory(), $ttl); + return new DBLockingProvider( + $c->getDatabaseConnection(), + $c->getLogger(), + new TimeFactory(), + $ttl, + !\OC::$CLI + ); } return new NoopLockingProvider(); }); -- cgit v1.2.3