Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14383762
D16388.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16388.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16388: Record the last time a connection was used on the connection object
Attached
Detach File
Event Timeline
Log In to Comment