Log systems polling
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use App\Classes\File\{Receive,Send};
|
||||
use App\Classes\Sock\SocketClient;
|
||||
use App\Classes\Sock\SocketException;
|
||||
use App\Models\{Address,Setup,System};
|
||||
use App\Models\{Address,Setup,System,SystemLog};
|
||||
|
||||
abstract class Protocol
|
||||
{
|
||||
@@ -324,10 +324,19 @@ abstract class Protocol
|
||||
foreach ($this->node->aka_other as $aka) {
|
||||
Address::findFTN($aka,TRUE,$so);
|
||||
}
|
||||
}
|
||||
|
||||
// @todo Log to history log in the DB.
|
||||
//if ($this->node->start_time && $this->setup->cfg('CFG_HISTORY')) {}
|
||||
// Log session in DB
|
||||
$slo = new SystemLog;
|
||||
$slo->items_sent = $this->send->total_sent;
|
||||
$slo->items_sent_size = $this->send->total_sent_bytes;
|
||||
$slo->items_recv = $this->recv->total_recv;
|
||||
$slo->items_recv_size = $this->recv->total_recv_bytes;
|
||||
$slo->sessiontype = $type;
|
||||
$slo->sessiontime = $this->node->session_time;
|
||||
$slo->result = ($rc & self::S_MASK);
|
||||
|
||||
$so->logs()->save($slo);
|
||||
}
|
||||
|
||||
// @todo Optional after session execution event
|
||||
// if ($this->node->start_time && $this->setup->cfg('CFG_AFTERSESSION')) {}
|
||||
|
Reference in New Issue
Block a user