NobrainerWeb\Bilinfo\Tasks\CheckDeletedListingsTask
Synopsis
class CheckDeletedListingsTask
extends BuildTask
{
- // members
- protected string $title = 'Bilinfo - Check deleted listings';
- protected string $description = 'Check if any of the listings currently in the DB are missing from the API response, then mark these as "Sold" (deleted)';
- private static string $segment = 'bilinfo-deleted-listings-task';
- protected boolean $verbose = false;
- // methods
- public void run()
- public array fetchData()
- public SS_List findMissingListings()
- public SS_List markDeletedListings()
- protected void log()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Members
private
- $segment
protected
- $description
- $title
- $verbose
Methods
protected
public
- fetchData() — Calls the API to get the listings data
- findMissingListings() — Find any Listings in the DB which have an ExternalID, that is NOT present in the API response (they are deleted)
- markDeletedListings() — Mark these listings as deleted. This is done by setting the ExternalDeletedDate field
- run()