Log function
implement log() function.
This commit is contained in:
@@ -8,6 +8,7 @@ use Friendica\BaseObject;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
@@ -38,12 +39,12 @@ class Cron
|
||||
if ($last) {
|
||||
$next = $last + ($poll_interval * 60);
|
||||
if ($next > time()) {
|
||||
logger('cron intervall not reached');
|
||||
Logger::log('cron intervall not reached');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
logger('cron: start');
|
||||
Logger::log('cron: start');
|
||||
|
||||
// Fork the cron jobs in separate parts to avoid problems when one of them is crashing
|
||||
Hook::fork($a->queue['priority'], "cron");
|
||||
@@ -124,7 +125,7 @@ class Cron
|
||||
// Poll contacts
|
||||
self::pollContacts($parameter, $generation);
|
||||
|
||||
logger('cron: end');
|
||||
Logger::log('cron: end');
|
||||
|
||||
Config::set('system', 'last_cron', time());
|
||||
|
||||
@@ -287,7 +288,7 @@ class Cron
|
||||
$priority = PRIORITY_LOW;
|
||||
}
|
||||
|
||||
logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
|
||||
Logger::log("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
|
||||
|
||||
Worker::add(['priority' => $priority, 'dont_fork' => true], 'OnePoll', (int)$contact['id']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user