mirror of
https://github.com/friendica/friendica
synced 2025-01-10 21:24:42 +00:00
Make PHP-CS happy
This commit is contained in:
parent
eb0c38f90f
commit
6d77eb9b10
2 changed files with 75 additions and 69 deletions
|
@ -277,10 +277,13 @@ class System
|
|||
*/
|
||||
public static function echoResponse(ResponseInterface $response)
|
||||
{
|
||||
header(sprintf("HTTP/%s %s %s",
|
||||
header(
|
||||
sprintf(
|
||||
"HTTP/%s %s %s",
|
||||
$response->getProtocolVersion(),
|
||||
$response->getStatusCode(),
|
||||
$response->getReasonPhrase())
|
||||
$response->getReasonPhrase()
|
||||
)
|
||||
);
|
||||
|
||||
foreach ($response->getHeaders() as $key => $header) {
|
||||
|
|
|
@ -603,13 +603,13 @@ class Worker
|
|||
self::$lock_duration = 0;
|
||||
|
||||
if ($duration > 3600) {
|
||||
Logger::info('Longer than 1 hour.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration/60, 3)]);
|
||||
Logger::info('Longer than 1 hour.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration / 60, 3)]);
|
||||
} elseif ($duration > 600) {
|
||||
Logger::info('Longer than 10 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration/60, 3)]);
|
||||
Logger::info('Longer than 10 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration / 60, 3)]);
|
||||
} elseif ($duration > 300) {
|
||||
Logger::info('Longer than 5 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration/60, 3)]);
|
||||
Logger::info('Longer than 5 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration / 60, 3)]);
|
||||
} elseif ($duration > 120) {
|
||||
Logger::info('Longer than 2 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration/60, 3)]);
|
||||
Logger::info('Longer than 2 minutes.', ['priority' => $queue['priority'], 'id' => $queue['id'], 'duration' => round($duration / 60, 3)]);
|
||||
}
|
||||
|
||||
Logger::info('Process done.', ['function' => $funcname, 'priority' => $queue['priority'], 'retrial' => $queue['retrial'], 'id' => $queue['id'], 'duration' => round($duration, 3)]);
|
||||
|
@ -1083,8 +1083,11 @@ class Worker
|
|||
$stamp = (float)microtime(true);
|
||||
foreach ($worker as $worker_pid => $worker_ids) {
|
||||
Logger::info('Set queue entry', ['pid' => $worker_pid, 'ids' => $worker_ids]);
|
||||
DBA::update('workerqueue', ['executed' => DateTimeFormat::utcNow(), 'pid' => $worker_pid],
|
||||
['id' => $worker_ids, 'done' => false, 'pid' => 0]);
|
||||
DBA::update(
|
||||
'workerqueue',
|
||||
['executed' => DateTimeFormat::utcNow(), 'pid' => $worker_pid],
|
||||
['id' => $worker_ids, 'done' => false, 'pid' => 0]
|
||||
);
|
||||
}
|
||||
self::$db_duration += (microtime(true) - $stamp);
|
||||
self::$db_duration_write += (microtime(true) - $stamp);
|
||||
|
|
Loading…
Reference in a new issue