Must not cache the mail waiting queries, otherwise mail/files will be resent in a query loop
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 12s

This commit is contained in:
Deon George 2024-05-12 14:56:18 +10:00
parent dd8558487c
commit 14c505c15b
2 changed files with 11 additions and 3 deletions

View File

@ -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())

View File

@ -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();
}
/**