ClearDirtyClassesTask
extends BuildTask
in package
Uses
LoggerTrait
Class ClearDirtyClasses Clear out classes that were not succesfully updated or deleted in Solr.
Any classes that failed to index properly or be removed properly need to be cleaned out regularly This task takes care of doing this. It can be run directly via /dev/tasks, or via a queued job
Table of Contents
Properties
- $description : string
- $logger : LoggerInterface
- The logger to use
- $title : string
- $segment : string
Methods
- getLogger() : LoggerInterface
- Get the logger
- run() : void
- Clean up Dirty Classes in the index
- setLogger() : void
- Set the logger if needed
- createDeleteList() : mixed
- Create an ArrayList of the dirty items to be deleted from Solr Uses the given class name to generate stub objects
- getDirtyClasses() : ArrayList|DataList
- Get the objects that need to be deleted or updated as a list
Properties
$description
protected
string
$description
= 'Clear out classes that are marked as dirty on Solr.'
Description
$logger
The logger to use
protected
LoggerInterface
$logger
$title
protected
string
$title
= 'Fix broken items in the Solr cores'
Title
$segment
private
static string
$segment
= 'SolrClearDirtyClasses'
URLSegment
Methods
getLogger()
Get the logger
public
getLogger() : LoggerInterface
Return values
LoggerInterfacerun()
Clean up Dirty Classes in the index
public
run(HTTPRequest $request) : void
When there are dirty classes to update or delete, the run will attempt to clean up. Dirty classes happen when changes to classes are not successfully updated in Solr
Parameters
- $request : HTTPRequest
Tags
setLogger()
Set the logger if needed
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
createDeleteList()
Create an ArrayList of the dirty items to be deleted from Solr Uses the given class name to generate stub objects
private
createDeleteList(array<string|int, mixed> $items, string $dirtyClass, ArrayList &$dirtyClasses) : mixed
Parameters
- $items : array<string|int, mixed>
- $dirtyClass : string
- $dirtyClasses : ArrayList
getDirtyClasses()
Get the objects that need to be deleted or updated as a list
private
getDirtyClasses(DirtyClass $dirtyObject) : ArrayList|DataList
Parameters
- $dirtyObject : DirtyClass