diff --git a/app/Classes/File/Mail.php b/app/Classes/File/Mail.php index a840e9d..590a5de 100644 --- a/app/Classes/File/Mail.php +++ b/app/Classes/File/Mail.php @@ -5,12 +5,15 @@ namespace App\Classes\File; use Carbon\Carbon; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Log; use App\Classes\Node; use App\Classes\FTN\{Message,Packet}; final class Mail extends Send { + private const LOGKEY = 'IFM'; + /** @var int Our internal position counter */ private int $readpos; @@ -56,6 +59,8 @@ final class Mail extends Send if ($successful) { $this->complete = TRUE; + Log::debug(sprintf('%s:- Successful close for [%d] - updating [%d] records.',self::LOGKEY,$this->type,$this->dbids->count()),['dbids'=>$this->dbids,'authd'=>$node->aka_remote_authed->pluck('id')]); + // Update netmail table if (($this->type === Send::T_NETMAIL) && ($x=$this->dbids)->count()) diff --git a/app/Models/Address.php b/app/Models/Address.php index 60f37c0..5e4f415 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -366,7 +366,8 @@ class Address extends Model ->whereNotNull('export_at') ->whereNull('sent_at') ->whereNull('echomails.deleted_at') - ->groupBy('addresses.id'); + ->groupBy('addresses.id') + ->dontCache(); } public function scopeUncollectedEchomailTotal($query) @@ -400,7 +401,8 @@ class Address extends Model ->whereNotNull('export_at') ->whereNull('sent_at') ->whereNull('files.deleted_at') - ->groupBy('addresses.id'); + ->groupBy('addresses.id') + ->dontCache(); } public function scopeUncollectedFilesTotal($query) @@ -432,7 +434,8 @@ class Address extends Model ->whereNull('sent_pkt') ->whereNull('sent_at') ->whereNull('netmails.deleted_at') - ->groupBy('addresses.id'); + ->groupBy('addresses.id') + ->dontCache(); } /**