Must not cache the mail waiting queries, otherwise mail/files will be resent in a query loop
This commit is contained in:
parent
dd8558487c
commit
14c505c15b
@ -5,12 +5,15 @@ namespace App\Classes\File;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use App\Classes\Node;
|
use App\Classes\Node;
|
||||||
use App\Classes\FTN\{Message,Packet};
|
use App\Classes\FTN\{Message,Packet};
|
||||||
|
|
||||||
final class Mail extends Send
|
final class Mail extends Send
|
||||||
{
|
{
|
||||||
|
private const LOGKEY = 'IFM';
|
||||||
|
|
||||||
/** @var int Our internal position counter */
|
/** @var int Our internal position counter */
|
||||||
private int $readpos;
|
private int $readpos;
|
||||||
|
|
||||||
@ -56,6 +59,8 @@ final class Mail extends Send
|
|||||||
if ($successful) {
|
if ($successful) {
|
||||||
$this->complete = TRUE;
|
$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
|
// Update netmail table
|
||||||
if (($this->type === Send::T_NETMAIL)
|
if (($this->type === Send::T_NETMAIL)
|
||||||
&& ($x=$this->dbids)->count())
|
&& ($x=$this->dbids)->count())
|
||||||
|
@ -366,7 +366,8 @@ class Address extends Model
|
|||||||
->whereNotNull('export_at')
|
->whereNotNull('export_at')
|
||||||
->whereNull('sent_at')
|
->whereNull('sent_at')
|
||||||
->whereNull('echomails.deleted_at')
|
->whereNull('echomails.deleted_at')
|
||||||
->groupBy('addresses.id');
|
->groupBy('addresses.id')
|
||||||
|
->dontCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeUncollectedEchomailTotal($query)
|
public function scopeUncollectedEchomailTotal($query)
|
||||||
@ -400,7 +401,8 @@ class Address extends Model
|
|||||||
->whereNotNull('export_at')
|
->whereNotNull('export_at')
|
||||||
->whereNull('sent_at')
|
->whereNull('sent_at')
|
||||||
->whereNull('files.deleted_at')
|
->whereNull('files.deleted_at')
|
||||||
->groupBy('addresses.id');
|
->groupBy('addresses.id')
|
||||||
|
->dontCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeUncollectedFilesTotal($query)
|
public function scopeUncollectedFilesTotal($query)
|
||||||
@ -432,7 +434,8 @@ class Address extends Model
|
|||||||
->whereNull('sent_pkt')
|
->whereNull('sent_pkt')
|
||||||
->whereNull('sent_at')
|
->whereNull('sent_at')
|
||||||
->whereNull('netmails.deleted_at')
|
->whereNull('netmails.deleted_at')
|
||||||
->groupBy('addresses.id');
|
->groupBy('addresses.id')
|
||||||
|
->dontCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user