Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14765554
D10294.id24789.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D10294.id24789.diff
View Options
diff --git a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
--- a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
+++ b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
@@ -246,6 +246,7 @@
case 'exec':
$info = $row['command'];
break;
+ case 's3':
case 'conduit':
$info = $row['method'];
break;
diff --git a/src/applications/files/engine/PhabricatorS3FileStorageEngine.php b/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
--- a/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
+++ b/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
@@ -40,11 +40,18 @@
$name = 'phabricator/'.implode('/', $parts);
AphrontWriteGuard::willWrite();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'putObject',
+ ));
$s3->putObject(
$data,
$this->getBucketName(),
$name,
$acl = 'private');
+ $profiler->endServiceCall($call_id, array());
return $name;
}
@@ -54,9 +61,17 @@
* Load a stored blob from Amazon S3.
*/
public function readFile($handle) {
- $result = $this->newS3API()->getObject(
+ $s3 = $this->newS3API();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'getObject',
+ ));
+ $result = $s3->getObject(
$this->getBucketName(),
$handle);
+ $profiler->endServiceCall($call_id, array());
// NOTE: The implementation of the API that we're using may respond with
// a successful result that has length 0 and no body property.
@@ -73,9 +88,17 @@
*/
public function deleteFile($handle) {
AphrontWriteGuard::willWrite();
- $this->newS3API()->deleteObject(
+ $s3 = $this->newS3API();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'deleteObject',
+ ));
+ $s3->deleteObject(
$this->getBucketName(),
$handle);
+ $profiler->endServiceCall($call_id, array());
}
diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
--- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php
+++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
@@ -27,7 +27,7 @@
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
$query = id(new PhabricatorPasteQuery())
- ->needRawContent(true)
+ ->needContent(true)
->withAuthorPHIDs($saved->getParameter('authorPHIDs', array()))
->withLanguages($saved->getParameter('languages', array()));
@@ -149,7 +149,7 @@
$created = phabricator_date($paste->getDateCreated(), $viewer);
$author = $handles[$paste->getAuthorPHID()]->renderLink();
- $lines = phutil_split_lines($paste->getRawContent());
+ $lines = phutil_split_lines($paste->getContent());
$preview = id(new PhabricatorSourceCodeView())
->setLimit(5)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 3:40 PM (14 h, 44 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7041338
Default Alt Text
D10294.id24789.diff (3 KB)
Attached To
Mode
D10294: Paste - fix caching mechanism for S3-stored files
Attached
Detach File
Event Timeline
Log In to Comment