Leverage Redis and queue to handle large packets
This commit is contained in:
@@ -106,7 +106,7 @@ class Message extends FTNBase
|
||||
private array $dst; // Address the message is to
|
||||
|
||||
private Collection $path; // FTS-0004.001 The message PATH lines
|
||||
private Collection $pathaddress; // Collection of Addresses after parsing seenby
|
||||
private Collection $pathaddress; // Collection of Addresses after parsing seenby
|
||||
private Collection $rogue_path; // Collection of FTNs in the Seen-by that are not defined
|
||||
private Collection $seenby; // FTS-0004.001 The message SEEN-BY lines
|
||||
private Collection $seenaddress; // Collection of Addresses after parsing seenby
|
||||
@@ -553,6 +553,11 @@ class Message extends FTNBase
|
||||
*/
|
||||
private function parseAddresses(string $type,Collection $addresses,Collection &$rogue): Collection
|
||||
{
|
||||
static $aos = NULL;
|
||||
|
||||
if (! $aos)
|
||||
$aos = collect();
|
||||
|
||||
$nodes = collect();
|
||||
|
||||
$net = NULL;
|
||||
@@ -567,7 +572,11 @@ class Message extends FTNBase
|
||||
};
|
||||
|
||||
$ftn = sprintf('%d:%d/%d',$this->fz,$net&0x7fff,$node&0x7fff);
|
||||
$ao = Address::findFTN($ftn);
|
||||
// @todo This should be enhanced to include the address at the time of the message.
|
||||
if ($aos->has($ftn))
|
||||
$ao = $aos->get($ftn);
|
||||
else
|
||||
$aos->put($ftn,$ao=(bool)Address::findFTN($ftn));
|
||||
|
||||
if (! $ao) {
|
||||
Log::alert(sprintf('%s:! Undefined Node [%s] in %s.',self::LOGKEY,$ftn,$type));
|
||||
|
Reference in New Issue
Block a user