mirror of
https://github.com/friendica/friendica
synced 2025-05-07 09:44:11 +02:00
Remove url caching, locking cleanup
This commit is contained in:
parent
c0aebd2bd4
commit
f09d9bc9cc
11 changed files with 55 additions and 73 deletions
|
@ -168,7 +168,7 @@ class Cron
|
|||
$oldest_id = $contact['id'];
|
||||
$oldest_date = $contact['last-update'];
|
||||
}
|
||||
Worker::add(PRIORITY_LOW, "UpdateContact", $contact['id'], 'force');
|
||||
Worker::add(PRIORITY_LOW, "UpdateContact", $contact['id']);
|
||||
++$count;
|
||||
}
|
||||
Logger::info('Initiated update for public contacts', ['interval' => $count, 'id' => $oldest_id, 'oldest' => $oldest_date]);
|
||||
|
|
|
@ -61,12 +61,12 @@ class OnePoll
|
|||
}
|
||||
|
||||
if (($contact['network'] != Protocol::MAIL) || $force) {
|
||||
Contact::updateFromProbe($contact_id, '', $force);
|
||||
Contact::updateFromProbe($contact_id);
|
||||
}
|
||||
|
||||
// Special treatment for wrongly detected local contacts
|
||||
if (!$force && ($contact['network'] != Protocol::DFRN) && Contact::isLocalById($contact_id)) {
|
||||
Contact::updateFromProbe($contact_id, Protocol::DFRN, true);
|
||||
Contact::updateFromProbe($contact_id, Protocol::DFRN);
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,14 +29,11 @@ class UpdateContact
|
|||
/**
|
||||
* Update contact data via probe
|
||||
* @param int $contact_id Contact ID
|
||||
* @param string $command
|
||||
*/
|
||||
public static function execute($contact_id, $command = '')
|
||||
public static function execute($contact_id)
|
||||
{
|
||||
$force = ($command == "force");
|
||||
$success = Contact::updateFromProbe($contact_id);
|
||||
|
||||
$success = Contact::updateFromProbe($contact_id, '', $force);
|
||||
|
||||
Logger::info('Updated from probe', ['id' => $contact_id, 'force' => $force, 'success' => $success]);
|
||||
Logger::info('Updated from probe', ['id' => $contact_id, 'success' => $success]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue