37 parent::__construct($name, $db);
46 $delay = (int) $this->config->notifications_queue_delay;
49 return parent::dequeue();
56 ->andWhere($select->expr()->isNull(
'worker'))
57 ->andWhere($select->compare(
'timestamp',
'<', $this->getCurrentTime(
"-{$delay} seconds")->getTimestamp(),
ELGG_VALUE_TIMESTAMP))
58 ->orderBy(
'id',
'ASC')
61 $row = $this->db->getDataRow($select);
70 ->andWhere($update->compare(
'id',
'=', $row->id,
ELGG_VALUE_ID))
71 ->andWhere($update->expr()->isNull(
'worker'));
73 if ($this->db->updateData($update,
true) !== 1) {
83 return unserialize($row->data);
dequeue()
Remove an item from the queue.mixed
__construct(string $name,\Elgg\Database $db,\Elgg\Config $config)
Create a queue.
if(parse_url(elgg_get_site_url(), PHP_URL_PATH)!== '/') if(file_exists(elgg_get_root_path(). 'robots.txt'))
Set robots.txt.
static table($table, $alias=null)
{}
FIFO queue that uses the database for persistence.
const ELGG_VALUE_TIMESTAMP
static fromTable($table, $alias=null)
{}
static fromTable($table, $alias=null)
{}
Database queue for notifications.