Leverage Redis and queue to handle large packets
This commit is contained in:
@@ -122,7 +122,7 @@ final class Receive extends Item
|
||||
|
||||
// Check the messages are from the uplink
|
||||
if ($this->ao->system->addresses->search(function($item) use ($po) { return $item->id == $po->fftn_o->id; }) === FALSE) {
|
||||
Log::error(sprintf('%s: ! Packet [%s] is not from this link? [%d]',self::LOGKEY,$this->fftn_o->ftn,$this->ao->system_id));
|
||||
Log::error(sprintf('%s: ! Packet [%s] is not from this link? [%d]',self::LOGKEY,$po->fftn_o->ftn,$this->ao->system_id));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -133,14 +133,14 @@ final class Receive extends Item
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($po->messages as $msg) {
|
||||
foreach ($po as $msg) {
|
||||
Log::info(sprintf('%s: - Mail from [%s] to [%s]',self::LOGKEY,$msg->fftn,$msg->tftn));
|
||||
|
||||
// @todo Quick check that the packet should be processed by us.
|
||||
// @todo validate that the packet's zone is in the domain.
|
||||
|
||||
// Dispatch job.
|
||||
ProcessPacket::dispatchSync($msg);
|
||||
ProcessPacket::dispatch($msg);
|
||||
}
|
||||
|
||||
if ($po->errors->count()) {
|
||||
|
Reference in New Issue
Block a user