You are here

protected function SpoolStorage::getExpirationTime in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::getExpirationTime()
  2. 3.x src/Spool/SpoolStorage.php \Drupal\simplenews\Spool\SpoolStorage::getExpirationTime()

Returns the expiration time for IN_PROGRESS status.

Return value

int A unix timestamp. Any IN_PROGRESS messages with a timestamp older than this will be re-allocated and re-sent.

2 calls to SpoolStorage::getExpirationTime()
SpoolStorage::countMails in src/Spool/SpoolStorage.php
Count data in mail spool table.
SpoolStorage::getMails in src/Spool/SpoolStorage.php
This function allocates mails to be sent in current run.

File

src/Spool/SpoolStorage.php, line 321

Class

SpoolStorage
Default database spool storage.

Namespace

Drupal\simplenews\Spool

Code

protected function getExpirationTime() {
  $timeout = $this->config
    ->get('mail.spool_progress_expiration');
  $expiration_time = REQUEST_TIME - $timeout;
  return $expiration_time;
}