Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15267715
D19980.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
993 B
Referenced Files
None
Subscribers
None
D19980.diff
View Options
diff --git a/src/future/postmark/PhutilPostmarkFuture.php b/src/future/postmark/PhutilPostmarkFuture.php
--- a/src/future/postmark/PhutilPostmarkFuture.php
+++ b/src/future/postmark/PhutilPostmarkFuture.php
@@ -6,6 +6,7 @@
private $accessToken;
private $method;
private $parameters;
+ private $timeout;
public function __construct() {
parent::__construct(null);
@@ -27,6 +28,15 @@
return $this;
}
+ public function setTimeout($timeout) {
+ $this->timeout = $timeout;
+ return $this;
+ }
+
+ public function getTimeout() {
+ return $this->timeout;
+ }
+
protected function getProxiedFuture() {
if (!$this->future) {
if ($this->accessToken === null) {
@@ -49,6 +59,11 @@
->addHeader('Accept', 'application/json')
->addHeader('Content-Type', 'application/json');
+ $timeout = $this->getTimeout();
+ if ($timeout) {
+ $future->setTimeout($timeout);
+ }
+
$this->future = $future;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 27, 9:35 AM (14 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7211563
Default Alt Text
D19980.diff (993 B)
Attached To
Mode
D19980: Add timeout support to the Postmark future
Attached
Detach File
Event Timeline
Log In to Comment