Ensure scheduled catalog scan/move jobs ids are unique. Remove deprecated objectType()

This commit is contained in:
Deon George 2024-09-18 13:30:49 +10:00
parent f136360e5c
commit 90323fef5f
3 changed files with 4 additions and 12 deletions

View File

@ -32,7 +32,7 @@ class CatalogMove implements ShouldQueue,ShouldBeUnique
public function middleware(): array
{
return [new WithoutOverlapping($this->o->id)];
return [new WithoutOverlapping($this->o::config.'|'.$this->o->id)];
}
/**
@ -43,12 +43,12 @@ class CatalogMove implements ShouldQueue,ShouldBeUnique
*/
public function handle()
{
$from = $this->o->file_name_rel(TRUE);
$from = $this->o->file_name_rel();
$to = $this->o->file_name_rel(FALSE);
Log::info(sprintf('%s: Moving [%s|%s] from [%s] to [%s]',
__METHOD__,
$this->o->objecttype(),
$this->o::config,
$this->o->id,
$from,
$to,

View File

@ -32,7 +32,7 @@ class CatalogScan implements ShouldQueue, ShouldBeUnique
public function middleware(): array
{
return [new WithoutOverlapping($this->o->id)];
return [new WithoutOverlapping($this->o::config.'|'.$this->o->id)];
}
/**

View File

@ -530,14 +530,6 @@ abstract class Catalog extends Model
->first();
}
/**
* Return my class shortname
*/
public function objectType(): string
{
return (new \ReflectionClass($this))->getShortName();
}
/**
* Get the id of the previous record
*/