mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
Remove url caching, locking cleanup
This commit is contained in:
parent
c0aebd2bd4
commit
f09d9bc9cc
11 changed files with 55 additions and 73 deletions
|
@ -822,7 +822,7 @@ class Processor
|
|||
}
|
||||
|
||||
Logger::info('Updating profile', ['object' => $activity['object_id']]);
|
||||
Contact::updateFromProbeByURL($activity['object_id'], true);
|
||||
Contact::updateFromProbeByURL($activity['object_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -679,7 +679,7 @@ class Receiver
|
|||
return;
|
||||
}
|
||||
|
||||
if (Contact::updateFromProbe($cid, '', true)) {
|
||||
if (Contact::updateFromProbe($cid)) {
|
||||
Logger::info('Update was successful', ['id' => $cid, 'uid' => $uid, 'url' => $url]);
|
||||
}
|
||||
|
||||
|
|
|
@ -2878,14 +2878,13 @@ class DFRN
|
|||
* Checks if the given contact url does support DFRN
|
||||
*
|
||||
* @param string $url profile url
|
||||
* @param boolean $update Update the profile
|
||||
* @return boolean
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function isSupportedByContactUrl($url, $update = false)
|
||||
public static function isSupportedByContactUrl($url)
|
||||
{
|
||||
$probe = Probe::uri($url, Protocol::DFRN, 0, !$update);
|
||||
$probe = Probe::uri($url, Protocol::DFRN);
|
||||
return $probe['network'] == Protocol::DFRN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -544,15 +544,8 @@ class OStatus
|
|||
} elseif ($item['contact-id'] < 0) {
|
||||
Logger::log("Item with uri ".$item["uri"]." is from a blocked contact.", Logger::DEBUG);
|
||||
} else {
|
||||
// We are having duplicated entries. Hopefully this solves it.
|
||||
if (DI::lock()->acquire('ostatus_process_item_insert')) {
|
||||
$ret = Item::insert($item);
|
||||
DI::lock()->release('ostatus_process_item_insert');
|
||||
Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
|
||||
} else {
|
||||
$ret = Item::insert($item);
|
||||
Logger::log("We couldn't lock - but tried to store the item anyway. Return value is ".$ret);
|
||||
}
|
||||
$ret = Item::insert($item);
|
||||
Logger::log("Item with uri ".$item["uri"]." for user ".$importer["uid"].' stored. Return value: '.$ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2218,14 +2211,13 @@ class OStatus
|
|||
* Checks if the given contact url does support OStatus
|
||||
*
|
||||
* @param string $url profile url
|
||||
* @param boolean $update Update the profile
|
||||
* @return boolean
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function isSupportedByContactUrl($url, $update = false)
|
||||
public static function isSupportedByContactUrl($url)
|
||||
{
|
||||
$probe = Probe::uri($url, Protocol::OSTATUS, 0, !$update);
|
||||
$probe = Probe::uri($url, Protocol::OSTATUS);
|
||||
return $probe['network'] == Protocol::OSTATUS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue