Compare commits

...

3 Commits

Author SHA1 Message Date
6430be0167 Fixes for address idle, to properly catch when role is NULL
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m18s
Create Docker Image / Build Docker Image (arm64) (push) Successful in -17h36m11s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2024-10-09 14:12:19 +11:00
e50eda58e0 Temporarily catch any skips from c76995f 2024-10-09 14:11:47 +11:00
c76995fa00 Revert 693e88 since unsuccessfully sent mail shouldnt be marked as sent 2024-10-09 14:11:11 +11:00
3 changed files with 6 additions and 4 deletions

View File

@ -125,6 +125,9 @@ class Send extends Base
if ($successful) {
$end = time()-$this->start;
Log::info(sprintf('%s:- Closing [%s], sent in [%d] with [%s] items',self::LOGKEY,$this->sending->nameas,$end,$this->sending->dbids->count()));
} else {
Log::alert(sprintf('%s:- Closing [%s], file NOT SENT successfully',self::LOGKEY,$this->sending->nameas));
}
$this->sending->close($successful,$node);

View File

@ -1029,12 +1029,10 @@ final class Binkp extends BaseProtocol
* @return bool
* @throws \Exception
* @todo We need to not add more files this session if a node skips a file
* @todo This incorrectly records the mail/file as sent and thus it is not sent again
*/
private function M_skip(string $buf): bool
{
Log::debug(sprintf('%s:+ Remote request to skip the file for now [%s]',self::LOGKEY,$buf));
throw new \Exception('We got a skip, but we dont handle it properly');
Log::alert(sprintf('%s:+ Remote request to skip the file for now [%s]',self::LOGKEY,$buf));
if ($file = $this->file_parse($buf)) {
if ($this->send->nameas
@ -1050,6 +1048,7 @@ final class Binkp extends BaseProtocol
$this->sessionClear(self::SE_WAITGOT|self::SE_SENDFILE);
$this->send->close(FALSE,$this->node);
throw new \Exception('We got a skip, but we dont handle it properly');
}
} else {

View File

@ -228,7 +228,7 @@ class AddressIdle implements ShouldQueue
->when($ao,fn($query)=>$query->where('addresses.id',$ao->id))
->where(fn($q)=>$q->where('last_session','<',$age)->orWhereNull('last_session'))
->whereRaw(sprintf('((role IS NULL) OR (role=0) OR ((role & %d) > 0))',$flags))
->whereRaw(sprintf('((role & %d) = 0)',Address::NODE_KEEP))
->whereRaw(sprintf('((role IS NULL) OR ((role & %d) = 0))',Address::NODE_KEEP))
->join('systems',['systems.id'=>'addresses.system_id'])
->ftnOrder()
->with(['system','zone.domain'])