Open Data Catalog v2.0.0
Drupal\datastore\Plugin\QueueWorker\Import Class Reference
Inheritance diagram for Drupal\datastore\Plugin\QueueWorker\Import:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, DatastoreService $datastore, LoggerChannelFactoryInterface $loggerFactory, ReferenceLookup $referenceLookup)
 
 processItem ($data)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Protected Member Functions

 invalidateCacheTags ($resourceId)
 
 requeue (array $data)
 

Protected Attributes

 $databaseQueue
 
 $datastore
 
 $referenceLookup
 

Detailed Description

Processes resource import.

@QueueWorker( id = "datastore_import", title = @Translation("Queue to process datastore import"), cron = { "time" = 180, "lease_time" = 10800 } )

Definition at line 28 of file Import.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\datastore\Plugin\QueueWorker\Import::__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
ConfigFactoryInterface  $configFactory,
DatastoreService  $datastore,
LoggerChannelFactoryInterface  $loggerFactory,
ReferenceLookup  $referenceLookup 
)

Constructs a \Drupal\Component\Plugin\PluginBase object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Config\ConfigFactoryInterface$configFactoryA config factory instance.
\Drupal\datastore\Service$datastoreA DKAN datastore service instance.
\Drupal\Core\Logger\LoggerChannelFactoryInterface$loggerFactoryA logger channel factory instance.
\Drupal\metastore\Reference\ReferenceLookup$referenceLookupThe reference lookup service.

Definition at line 70 of file Import.php.

Member Function Documentation

◆ create()

static Drupal\datastore\Plugin\QueueWorker\Import::create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{}

Definition at line 91 of file Import.php.

◆ invalidateCacheTags()

Drupal\datastore\Plugin\QueueWorker\Import::invalidateCacheTags (   $resourceId)
protected

Invalidate all appropriate cache tags for this resource.

Parameters
mixed$resourceIdA resource ID.

Definition at line 186 of file Import.php.

◆ processItem()

Drupal\datastore\Plugin\QueueWorker\Import::processItem (   $data)

{}

Definition at line 106 of file Import.php.

◆ requeue()

Drupal\datastore\Plugin\QueueWorker\Import::requeue ( array  $data)
protected

Requeues the job with extra state information.

Parameters
array$dataQueue data.
Returns
mixed Queue ID or false if unsuccessful.
Todo:
Clarify return value. Documentation suggests it should return ID.

Definition at line 201 of file Import.php.

Member Data Documentation

◆ $databaseQueue

Drupal\datastore\Plugin\QueueWorker\Import::$databaseQueue
protected

Definition at line 36 of file Import.php.

◆ $datastore

Drupal\datastore\Plugin\QueueWorker\Import::$datastore
protected

Definition at line 43 of file Import.php.

◆ $referenceLookup

Drupal\datastore\Plugin\QueueWorker\Import::$referenceLookup
protected

Definition at line 50 of file Import.php.