From 752462d20f685e040661a47186c23d0fb1bef10d Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 21 May 2024 21:10:58 +1000 Subject: [PATCH] Update job:list, and change "subject" to "jobname" --- app/Console/Commands/JobList.php | 2 +- app/Jobs/AddressPoll.php | 4 ++-- app/Jobs/EchoareaImport.php | 2 +- app/Jobs/FileareaImport.php | 2 +- app/Jobs/MessageProcess.php | 5 +++-- app/Jobs/NodelistImport.php | 2 +- app/Jobs/PacketProcess.php | 2 +- app/Jobs/TicProcess.php | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/Console/Commands/JobList.php b/app/Console/Commands/JobList.php index 1af5a54..fc1b60f 100644 --- a/app/Console/Commands/JobList.php +++ b/app/Console/Commands/JobList.php @@ -39,7 +39,7 @@ class JobList extends Command $o->uuid, $o->id, $o->display_name, - $o->command->subject, + $o->command->jobname, $o->attempts,$o->maxTries, $o->available_at ?: '-', $o->attempts ? sprintf(' (Created:%s)',$o->created_at) : '' diff --git a/app/Jobs/AddressPoll.php b/app/Jobs/AddressPoll.php index 0de157f..b761ee4 100644 --- a/app/Jobs/AddressPoll.php +++ b/app/Jobs/AddressPoll.php @@ -50,7 +50,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique case 'address': return $this->ao; - case 'subject': + case 'jobname': return $this->ao->ftn; default: @@ -125,7 +125,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique } } catch (SocketException $e) { - Log::error(sprintf('%s:! Unable to connect to [%s]: %s',self::LOGKEY,$this->ao->ftn,$e->getMessage())); + Log::error(sprintf('%s:! SocketException Unable to connect to [%s]: %s',self::LOGKEY,$this->ao->ftn,$e->getMessage())); break; } catch (\ErrorException $e) { diff --git a/app/Jobs/EchoareaImport.php b/app/Jobs/EchoareaImport.php index 5fc282c..a8f0b42 100644 --- a/app/Jobs/EchoareaImport.php +++ b/app/Jobs/EchoareaImport.php @@ -47,7 +47,7 @@ class EchoareaImport implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': + case 'jobname': return sprintf('%s-%s',$this->do->name,$this->file); default: diff --git a/app/Jobs/FileareaImport.php b/app/Jobs/FileareaImport.php index 65fce5f..464ce7a 100644 --- a/app/Jobs/FileareaImport.php +++ b/app/Jobs/FileareaImport.php @@ -47,7 +47,7 @@ class FileareaImport implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': + case 'jobname': return sprintf('%s-%s',$this->do->name,$this->file); default: diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 2f3a803..e29fed2 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -41,8 +41,9 @@ class MessageProcess implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': - return sprintf('%s-%s-%s',$this->pktname,$this->mo->set->get('set_sender')->ftn,$this->mo->msgid); + case 'jobname': + $mo = unserialize($this->mo); + return sprintf('%s-%s-%s',$mo->set->get('set_pkt'),$mo->set->get('set_sender')->ftn,$mo->msgid); default: return NULL; diff --git a/app/Jobs/NodelistImport.php b/app/Jobs/NodelistImport.php index 0831bec..29017ed 100644 --- a/app/Jobs/NodelistImport.php +++ b/app/Jobs/NodelistImport.php @@ -58,7 +58,7 @@ class NodelistImport implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': + case 'jobname': return sprintf('%s-%s',$this->domain?->name,is_object($this->file) ? $this->file->name : $this->file); default: diff --git a/app/Jobs/PacketProcess.php b/app/Jobs/PacketProcess.php index 45f2efb..af6059b 100644 --- a/app/Jobs/PacketProcess.php +++ b/app/Jobs/PacketProcess.php @@ -44,7 +44,7 @@ class PacketProcess implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': + case 'jobname': return $this->filename; default: diff --git a/app/Jobs/TicProcess.php b/app/Jobs/TicProcess.php index 58056d1..aa8b56f 100644 --- a/app/Jobs/TicProcess.php +++ b/app/Jobs/TicProcess.php @@ -42,7 +42,7 @@ class TicProcess implements ShouldQueue public function __get($key): mixed { switch ($key) { - case 'subject': + case 'jobname': return sprintf('%s %s',$this->do?->name,$this->file); default: