Improvements to finding idle nodes, last_session actually only shows the last time the remote polled us
This commit is contained in:
@@ -31,12 +31,11 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
||||
public function toNetmail(object $notifiable): Netmail
|
||||
{
|
||||
$now = Carbon::now();
|
||||
|
||||
$o = $this->setupNetmail($notifiable);
|
||||
$ao = $notifiable->routeNotificationFor(static::via);
|
||||
|
||||
Log::info(sprintf('%s:+ Sending a NODE MARKED DOWN NETMAIL for address [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
||||
$o = $this->setupNetmail($notifiable);
|
||||
$o->subject = sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d'));
|
||||
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH);
|
||||
|
||||
@@ -44,7 +43,7 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue
|
||||
$msg = $this->page(TRUE,'down');
|
||||
|
||||
$msg->addText(sprintf("Hi %s,\r\r",$this->ao->system->sysop))
|
||||
->addText(sprintf("Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now)))
|
||||
->addText(sprintf("Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',$this->ao->system->last_seen?->diffInDays($now)))
|
||||
->addText("\r")
|
||||
->addText("You have (waiting for collection):\r")
|
||||
->addText(sprintf("* %s Netmails\r",number_format($this->ao->uncollected_netmail)))
|
||||
|
Reference in New Issue
Block a user