diff --git a/app/Jobs/EchoareaImport.php b/app/Jobs/EchoareaImport.php index 31bf77d..2dea0ea 100644 --- a/app/Jobs/EchoareaImport.php +++ b/app/Jobs/EchoareaImport.php @@ -44,6 +44,17 @@ class EchoareaImport implements ShouldQueue $this->delete_recs = $delete_recs; } + public function __get($key): mixed + { + switch ($key) { + case 'subject': + return sprintf('%s-%s',$this->do->name,$this->file); + + default: + return NULL; + } + } + /** * Execute the job. * diff --git a/app/Jobs/MailSend.php b/app/Jobs/MailSend.php index 058aebb..4d41bd3 100644 --- a/app/Jobs/MailSend.php +++ b/app/Jobs/MailSend.php @@ -31,6 +31,17 @@ class MailSend implements ShouldQueue $this->crash = $crash; } + public function __get($key): mixed + { + switch ($key) { + case 'subject': + return __METHOD__; + + default: + return NULL; + } + } + /** * Execute the job. */ diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 4b303de..fb175c0 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -38,6 +38,17 @@ class MessageProcess implements ShouldQueue $this->skipbot = $skipbot; } + public function __get($key): mixed + { + switch ($key) { + case 'subject': + return sprintf('%s-%s-%s',$this->packet,$this->sender->ftn,$this->msg->msgid); + + default: + return NULL; + } + } + /** * When calling MessageProcess - we assume that the packet is from a valid source, and * the destination (netmail/echomail) is also valid diff --git a/app/Jobs/NodelistImport.php b/app/Jobs/NodelistImport.php index 4a066a5..1f51d11 100644 --- a/app/Jobs/NodelistImport.php +++ b/app/Jobs/NodelistImport.php @@ -24,6 +24,8 @@ class NodelistImport implements ShouldQueue protected const LOGKEY = 'JNI'; private const importkey = 'nodelist'; + public const QUEUE = 'nodelist'; + private File|string $file; private ?string $domain; private bool $delete_file; @@ -43,6 +45,19 @@ class NodelistImport implements ShouldQueue $this->domain = $domain; $this->delete_file = $delete_file; $this->delete_recs = $delete_recs; + + $this->onQueue(self::QUEUE); + } + + public function __get($key): mixed + { + switch ($key) { + case 'subject': + return sprintf('%s-%s',$this->domain?->name,is_object($this->file) ? $this->file->name : $this->file); + + default: + return NULL; + } } /** diff --git a/app/Jobs/TicProcess.php b/app/Jobs/TicProcess.php index 579102f..45a751d 100644 --- a/app/Jobs/TicProcess.php +++ b/app/Jobs/TicProcess.php @@ -37,6 +37,17 @@ class TicProcess implements ShouldQueue $this->onQueue(self::QUEUE); } + public function __get($key): mixed + { + switch ($key) { + case 'subject': + return sprintf('%s %s',$this->do?->name,$this->file); + + default: + return NULL; + } + } + /** * Execute the job. *