Added subject so that it works with job:list

This commit is contained in:
Deon George 2023-09-05 19:42:41 +12:00
parent 2a557f2a61
commit 3cd0deada0
5 changed files with 59 additions and 0 deletions

View File

@ -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.
*

View File

@ -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.
*/

View File

@ -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

View File

@ -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;
}
}
/**

View File

@ -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.
*