You are here

public static function FeedImportSQLHashes::rescheduleAll in Feed Import 8

Reschedules all entities

Parameters

string $name: Feed machine name

int $ttl: Time to live

Overrides FeedImportStaticHashManager::rescheduleAll

File

feed_import_base/src/FeedImportSQLHashes.php, line 272

Class

FeedImportSQLHashes
This class implements SQL hash storage

Namespace

Drupal\feed_import_base

Code

public static function rescheduleAll($name, $ttl) {
  if ($ttl) {
    $ttl += time();
  }
  db_update('feed_import_hashes')
    ->condition('feed_machine_name', $name)
    ->condition('expire', static::MARK_PROTECTED, '>')
    ->fields(array(
    'expire' => $ttl,
  ))
    ->execute();
}