Improvements to finding idle nodes, last_session actually only shows the last time the remote polled us
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 47s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m53s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-09-15 22:00:40 +10:00
parent 832b496b0b
commit 4501443a43
17 changed files with 122 additions and 38 deletions

View File

@@ -49,8 +49,8 @@ class NodeDelisted extends Notification //implements ShouldQueue
->line(sprintf('Your system has been DE-LISTED, because it hasnt polled **%s** with address %s since **%s** (%d days).',
$x,
$this->ao->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',
$this->ao->system->last_seen?->diffInDays($now)))
->line('')
->line('If you think this was a mistake, please let me know.')
->line(sprintf('If you think about returning to %s, then reach out and we can get you back online pretty quickly.',$x));

View File

@@ -49,13 +49,13 @@ class NodeMarkedDown extends Notification //implements ShouldQueue
->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).',
$this->ao->zone->domain->name,
$this->ao->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',
$this->ao->system->last_seen?->diffInDays($now)))
->line('')
->line('You have (waiting for collection):')
->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))
->lineIf($this->ao->uncollected_echomail,sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail)))
->lineIf($this->ao->uncollected_files,sprintf('* %s Files',number_format($this->ao->uncollected_files)))
->line(sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))
->line(sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail)))
->line(sprintf('* %s Files',number_format($this->ao->uncollected_files)))
->line('')
->line(sprintf('Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**',$now->addDays(7)->format('Y-m-d')))
->line('If you think you\'ve received this email by mistake or need help, please let me know.');

View File

@@ -49,15 +49,15 @@ class NodeMarkedHold extends Notification //implements ShouldQueue
->line(sprintf('Your system has been marked **HOLD**, because it hasnt polled **%s** with address %s since **%s** (%d days).',
$this->ao->zone->domain->name,
$this->ao->ftn4d,
$this->ao->system->last_session->format('Y-m-d'),
$this->ao->system->last_session->diffInDays($now)))
$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',
$this->ao->system->last_seen?->diffInDays($now)))
->line('')
->line('You have (waiting for collection):')
->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))
->lineIf($this->ao->uncollected_echomail,sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail)))
->lineIf($this->ao->uncollected_files,sprintf('* %s Files',number_format($this->ao->uncollected_files)))
->line(sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))
->line(sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail)))
->line(sprintf('* %s Files',number_format($this->ao->uncollected_files)))
->line('')
->line(sprintf('To clear this status, all you need to do make sure your system polls and collects mail by **%s**',$this->ao->system->last_session->addDays(config('fido.idle.down'))->format('Y-m-d')))
->line(sprintf('To clear this status, all you need to do make sure your system polls and collects mail by **%s**',($this->ao->system->last_seen ?: Carbon::now())->addDays(config('fido.idle.down'))->format('Y-m-d')))
->line('If you think you\'ve received this email by mistake or need help, please let me know.');
}
}