mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
FIX Ensure queued job signature remains under 64 character limit (fixes Postgres error)
This commit is contained in:
parent
e47ab9c07d
commit
fccac37621
@ -109,9 +109,7 @@ class SearchUpdateCommitJobProcessor implements QueuedJob
|
|||||||
|
|
||||||
public function getSignature()
|
public function getSignature()
|
||||||
{
|
{
|
||||||
// There is only ever one commit job on the queue so the signature is consistent
|
return sha1(get_class($this) . time() . mt_rand(0, 100000));
|
||||||
// See QueuedJobService::queueJob() for the code that prevents duplication
|
|
||||||
return __CLASS__;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
|
@ -74,7 +74,7 @@ class SolrReindexGroupQueuedJob extends SolrReindexQueuedJobBase
|
|||||||
$data->jobData->class = $this->class;
|
$data->jobData->class = $this->class;
|
||||||
$data->jobData->groups = $this->groups;
|
$data->jobData->groups = $this->groups;
|
||||||
$data->jobData->group = $this->group;
|
$data->jobData->group = $this->group;
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,11 +90,6 @@ class SolrReindexGroupQueuedJob extends SolrReindexQueuedJobBase
|
|||||||
$this->group = $jobData->group;
|
$this->group = $jobData->group;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSignature()
|
|
||||||
{
|
|
||||||
return md5(get_class($this) . time() . mt_rand(0, 100000));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
return sprintf(
|
return sprintf(
|
||||||
|
@ -51,7 +51,7 @@ class SolrReindexQueuedJob extends SolrReindexQueuedJobBase
|
|||||||
$data->jobData->batchSize = $this->batchSize;
|
$data->jobData->batchSize = $this->batchSize;
|
||||||
$data->jobData->taskName = $this->taskName;
|
$data->jobData->taskName = $this->taskName;
|
||||||
$data->jobData->classes = $this->classes;
|
$data->jobData->classes = $this->classes;
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,11 +65,6 @@ class SolrReindexQueuedJob extends SolrReindexQueuedJobBase
|
|||||||
$this->classes = $jobData->classes;
|
$this->classes = $jobData->classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSignature()
|
|
||||||
{
|
|
||||||
return __CLASS__;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
return 'Solr Reindex Job';
|
return 'Solr Reindex Job';
|
||||||
|
@ -138,6 +138,11 @@ abstract class SolrReindexQueuedJobBase implements QueuedJob
|
|||||||
return QueuedJob::QUEUED;
|
return QueuedJob::QUEUED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSignature()
|
||||||
|
{
|
||||||
|
return sha1(get_class($this) . time() . mt_rand(0, 100000));
|
||||||
|
}
|
||||||
|
|
||||||
public function addMessage($message)
|
public function addMessage($message)
|
||||||
{
|
{
|
||||||
$this->messages[] = $message;
|
$this->messages[] = $message;
|
||||||
|
Loading…
Reference in New Issue
Block a user