Fix polling for messages sent via uplinks, where those systems which had a status of HOLD
This commit is contained in:
parent
7c23971e58
commit
b34b046d3c
@ -48,21 +48,6 @@ class MailSend #implements ShouldQueue
|
||||
->join('systems',['systems.id'=>'a.system_id'])
|
||||
->join('zones',['zones.id'=>'a.zone_id'])
|
||||
->join('domains',['domains.id'=>'zones.domain_id'])
|
||||
->where(function($query) {
|
||||
return $query->whereNull('autohold')
|
||||
->orWhere('autohold',FALSE);
|
||||
})
|
||||
->when(! is_null($this->crash),function($query) {
|
||||
return $query->when(
|
||||
$this->crash,
|
||||
function($query) {
|
||||
return $query->where('pollmode',$this->crash);
|
||||
},
|
||||
function($query) {
|
||||
return $query->whereNotNull('pollmode');
|
||||
}
|
||||
);
|
||||
})
|
||||
->groupBy('a.system_id','a.id','a.zone_id','addresses.region_id','a.host_id','a.node_id','a.point_id','addresses.hub_id','addresses.role')
|
||||
->with(['system','zone.domain'])
|
||||
->dontCache()
|
||||
@ -80,6 +65,13 @@ class MailSend #implements ShouldQueue
|
||||
} else {
|
||||
return $item;
|
||||
}
|
||||
})
|
||||
->filter(function($item) {
|
||||
if ($item->ftn3d === '1337:1/100') dump(['item'=>$item,'ftn'=>$item->ftn,'autohold'=>$item->system->authold,'pollmode'=>$item->system->pollmode,'crash'=>$this->crash]);
|
||||
if ($item->system->autohold)
|
||||
return NULL;
|
||||
|
||||
return is_null($this->crash) || ($item->system->pollmode) || ($item->system->pollmode === $this->crash) ? $item : NULL;
|
||||
});
|
||||
|
||||
foreach ($u->groupBy('ftn') as $oo) {
|
||||
|
Loading…
Reference in New Issue
Block a user