Netmail waiting query optimisation, increase logging on what we have for a node
This commit is contained in:
parent
5f3db71451
commit
b891abb611
@ -201,7 +201,7 @@ class Send extends Base
|
|||||||
|
|
||||||
// Files
|
// Files
|
||||||
if (($x=$ao->filesWaiting())->count()) {
|
if (($x=$ao->filesWaiting())->count()) {
|
||||||
Log::debug(sprintf('%s:- [%d] Files(s) added for sending to [%s]',self::LOGKEY,$x->count(),$ao->ftn));
|
Log::info(sprintf('%s:- [%d] Files(s) added for sending to [%s]',self::LOGKEY,$x->count(),$ao->ftn));
|
||||||
|
|
||||||
// Add Files
|
// Add Files
|
||||||
foreach ($x as $fo) {
|
foreach ($x as $fo) {
|
||||||
|
@ -1135,8 +1135,8 @@ class Address extends Model
|
|||||||
*/
|
*/
|
||||||
public function getNetmail(): ?Packet
|
public function getNetmail(): ?Packet
|
||||||
{
|
{
|
||||||
if (($num=$this->netmailAlertWaiting())->count()) {
|
if ($count=($num=$this->netmailAlertWaiting())->count()) {
|
||||||
Log::debug(sprintf('%s:= Packaging [%d] netmail alerts to [%s]',self::LOGKEY,$num->count(),$this->ftn));
|
Log::info(sprintf('%s:= Packaging [%d] netmail alerts to [%s]',self::LOGKEY,$count,$this->ftn));
|
||||||
|
|
||||||
$msgs = $num->get();
|
$msgs = $num->get();
|
||||||
|
|
||||||
@ -1160,11 +1160,11 @@ class Address extends Model
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($num=$this->netmailWaiting())->count()) {
|
if ($count=($num=$this->netmailWaiting())->count()) {
|
||||||
Log::debug(sprintf('%s:= Got [%d] netmails for [%s] for sending',self::LOGKEY,$num->count(),$this->ftn));
|
Log::info(sprintf('%s:= Got [%d] netmails for [%s] for sending',self::LOGKEY,$count,$this->ftn));
|
||||||
|
|
||||||
// Limit to max messages
|
// Limit to max messages
|
||||||
if ($num->count() > $this->system->pkt_msgs)
|
if ($count > $this->system->pkt_msgs)
|
||||||
Log::alert(sprintf('%s:= Only sending [%d] netmails for [%s]',self::LOGKEY,$this->system->pkt_msgs,$this->ftn));
|
Log::alert(sprintf('%s:= Only sending [%d] netmails for [%s]',self::LOGKEY,$this->system->pkt_msgs,$this->ftn));
|
||||||
|
|
||||||
return $this->system->packet($this)->mail($num->take($this->system->pkt_msgs)->get());
|
return $this->system->packet($this)->mail($num->take($this->system->pkt_msgs)->get());
|
||||||
|
Loading…
Reference in New Issue
Block a user