Page MenuHomePhabricator

D16388.id.diff
No OneTemporary

D16388.id.diff

diff --git a/src/aphront/storage/connection/AphrontDatabaseConnection.php b/src/aphront/storage/connection/AphrontDatabaseConnection.php
--- a/src/aphront/storage/connection/AphrontDatabaseConnection.php
+++ b/src/aphront/storage/connection/AphrontDatabaseConnection.php
@@ -11,6 +11,7 @@
private $readOnly;
private $queryTimeout;
private $locks = array();
+ private $lastActiveEpoch;
abstract public function getInsertID();
abstract public function getAffectedRows();
@@ -20,6 +21,15 @@
abstract public function close();
abstract public function openConnection();
+ final public function setLastActiveEpoch($epoch) {
+ $this->lastActiveEpoch = $epoch;
+ return $this;
+ }
+
+ final public function getLastActiveEpoch() {
+ return $this->lastActiveEpoch;
+ }
+
public function queryData($pattern/* , $arg, $arg, ... */) {
$args = func_get_args();
array_unshift($args, $this);
diff --git a/src/xsprintf/queryfx.php b/src/xsprintf/queryfx.php
--- a/src/xsprintf/queryfx.php
+++ b/src/xsprintf/queryfx.php
@@ -3,6 +3,8 @@
function queryfx(AphrontDatabaseConnection $conn, $sql /* , ... */) {
$argv = func_get_args();
$query = call_user_func_array('qsprintf', $argv);
+
+ $conn->setLastActiveEpoch(time());
$conn->executeRawQuery($query);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 8:16 AM (15 h, 33 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6917924
Default Alt Text
D16388.id.diff (1 KB)

Event Timeline