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);
if(! $user||! $user->canDelete()) $name
Query builder for updating data in the database.
static fromTable(string $table)
Returns a QueryBuilder for deleting data from a given table.
Query builder for fetching data from the database.
static fromTable(string $table, ?string $alias=null)
Returns a QueryBuilder for selecting data from a given table.
Query builder for updating data in the database.
static table(string $table)
Returns a QueryBuilder for updating data in a given table.
Database queue for notifications.
dequeue()
{Remove an item from the queue.mixed}
__construct(string $name, \Elgg\Database $db, \Elgg\Config $config)
Create a queue.
FIFO queue that uses the database for persistence.
const ELGG_VALUE_TIMESTAMP
foreach($recommendedExtensions as $extension) if(empty(ini_get('session.gc_probability'))||empty(ini_get('session.gc_divisor'))) $db
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.