mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Prevent indexing tracks that shouldn't be indexed
This commit is contained in:
parent
2af5799564
commit
8df8f73b32
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ trait IndexedInElasticsearchTrait
|
|||
*/
|
||||
public function updateElasticsearchEntry(bool $removeFromIndex = false)
|
||||
{
|
||||
// If it shouldn't be indexed, always force a removal from the index.
|
||||
if (!$this->shouldBeIndexed()) {
|
||||
$removeFromIndex = true;
|
||||
}
|
||||
|
||||
$job = (new UpdateSearchIndexForEntity($this->getElasticsearchParameters(!$removeFromIndex), $removeFromIndex))->onQueue(config('ponyfm.indexing_queue'));
|
||||
$this->dispatch($job);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue