Ensure scheduled catalog scan/move jobs ids are unique. Remove deprecated objectType()
This commit is contained in:
parent
f136360e5c
commit
90323fef5f
@ -32,7 +32,7 @@ class CatalogMove implements ShouldQueue,ShouldBeUnique
|
|||||||
|
|
||||||
public function middleware(): array
|
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()
|
public function handle()
|
||||||
{
|
{
|
||||||
$from = $this->o->file_name_rel(TRUE);
|
$from = $this->o->file_name_rel();
|
||||||
$to = $this->o->file_name_rel(FALSE);
|
$to = $this->o->file_name_rel(FALSE);
|
||||||
|
|
||||||
Log::info(sprintf('%s: Moving [%s|%s] from [%s] to [%s]',
|
Log::info(sprintf('%s: Moving [%s|%s] from [%s] to [%s]',
|
||||||
__METHOD__,
|
__METHOD__,
|
||||||
$this->o->objecttype(),
|
$this->o::config,
|
||||||
$this->o->id,
|
$this->o->id,
|
||||||
$from,
|
$from,
|
||||||
$to,
|
$to,
|
||||||
|
@ -32,7 +32,7 @@ class CatalogScan implements ShouldQueue, ShouldBeUnique
|
|||||||
|
|
||||||
public function middleware(): array
|
public function middleware(): array
|
||||||
{
|
{
|
||||||
return [new WithoutOverlapping($this->o->id)];
|
return [new WithoutOverlapping($this->o::config.'|'.$this->o->id)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -530,14 +530,6 @@ abstract class Catalog extends Model
|
|||||||
->first();
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return my class shortname
|
|
||||||
*/
|
|
||||||
public function objectType(): string
|
|
||||||
{
|
|
||||||
return (new \ReflectionClass($this))->getShortName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the id of the previous record
|
* Get the id of the previous record
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user