Display the runtime
This commit is contained in:
parent
4b5a743645
commit
30bcb24af7
|
@ -146,11 +146,13 @@ class APDelivery
|
||||||
} else {
|
} else {
|
||||||
$data = ActivityPub\Transmitter::createCachedActivityFromItem($item_id);
|
$data = ActivityPub\Transmitter::createCachedActivityFromItem($item_id);
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
|
$timestamp = microtime(true);
|
||||||
$response = HTTPSignature::post($data, $inbox, $uid);
|
$response = HTTPSignature::post($data, $inbox, $uid);
|
||||||
|
$runtime = microtime(true) - $timestamp;
|
||||||
$success = $response->isSuccess();
|
$success = $response->isSuccess();
|
||||||
$timeout = $response->isTimeout();
|
$timeout = $response->isTimeout();
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
Logger::debug('Delivery failed', ['retcode' => $response->getReturnCode(), 'timeout' => $timeout, 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]);
|
Logger::debug('Delivery failed', ['retcode' => $response->getReturnCode(), 'timeout' => $timeout, 'runtime' => round($runtime, 3), 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]);
|
||||||
}
|
}
|
||||||
if ($uri_id) {
|
if ($uri_id) {
|
||||||
if ($success) {
|
if ($success) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user