Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentserver_community.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph C Wang <joequant@gmail.com>2020-04-08 06:25:41 +0300
committerJoseph C Wang <joequant@gmail.com>2020-04-08 06:28:26 +0300
commit5bace2e02910c1c76018d5e2f2c7b4b1f1c953d1 (patch)
treec17596873fb7924f5a8f470ae10654aee9480370
parentd6a76d2ceae02f3c2cee087971147ee14e4ba0ef (diff)
reduce expired timeout to commit changes faster
This reduces the timeout to mark a page inactive from 100 seconds to 15 seconds. This allows for saved pages to be committed more quickly. Addresses issues in nextcloud/documentserver_community#100 Signed-off-by: Joseph C Wang <joequant@gmail.com>
-rw-r--r--lib/Channel/SessionManager.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Channel/SessionManager.php b/lib/Channel/SessionManager.php
index 7fa0365..f93cd42 100644
--- a/lib/Channel/SessionManager.php
+++ b/lib/Channel/SessionManager.php
@@ -27,6 +27,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
class SessionManager {
+ const EXPIRED_SESSION_TIMEOUT = 15;
private $connection;
private $timeFactory;
private $ipcFactory;
@@ -127,7 +128,8 @@ class SessionManager {
private function getExpiredSessions(): array {
$query = $this->connection->getQueryBuilder();
- $cutoffTime = $this->timeFactory->getTime() - (Channel::TIMEOUT * 4);
+ $cutoffTime = $this->timeFactory->getTime() -
+ EXPIRED_SESSION_TIMEOUT;
$query->select('session_id')
->from('documentserver_sess')