Now correctly showing packet receive time, and sending Notifications based on the packet address, not the node address
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Classes\File;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
@@ -100,6 +101,8 @@ class Receive extends Base
|
||||
throw new \Exception('No file to close');
|
||||
|
||||
if ($this->f) {
|
||||
$rcvd_time = Carbon::now();
|
||||
|
||||
if ($this->pos !== $this->receiving->recvsize)
|
||||
Log::warning(sprintf('%s:- Closing [%s], but missing [%d] bytes',self::LOGKEY,$this->receiving->nameas,$this->receiving->recvsize-$this->pos));
|
||||
else
|
||||
@@ -175,9 +178,9 @@ class Receive extends Base
|
||||
try {
|
||||
// Dispatch job.
|
||||
if ($queue)
|
||||
MessageProcess::dispatch($msg,$f->pktName(),$this->ao);
|
||||
MessageProcess::dispatch($msg,$f->pktName(),$this->ao,$po->fftn_o,$rcvd_time);
|
||||
else
|
||||
MessageProcess::dispatchSync($msg,$f->pktName(),$this->ao);
|
||||
MessageProcess::dispatchSync($msg,$f->pktName(),$this->ao,$po->fftn_o,$rcvd_time);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error(sprintf('%s:! Got error dispatching message [%s] (%d:%s-%s).',self::LOGKEY,$msg->msgid,$e->getLine(),$e->getFile(),$e->getMessage()));
|
||||
|
Reference in New Issue
Block a user