use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Queue as QueueModel;
+use Friendica\Model\PushSubscriber;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\PortableContact;
logger('filling queue jobs - start');
// Handling the pubsubhubbub requests
- Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'PubSubPublish');
+ PushSubscriber::requeue();
$r = dba::inArray(dba::p("SELECT `id` FROM `queue` WHERE `next` < UTC_TIMESTAMP() ORDER BY `batch`, `cid`"));
return;
}
- if (empty($contact['notify'])) {
+ if (empty($contact['notify']) || $contact['archive']) {
QueueModel::removeItem($q_item['id']);
return;
}
logger("Check server " . $server . " (" . $contact["network"] . ")");
$vital = PortableContact::checkServer($server, $contact["network"], true);
- Cache::set($cachekey_server . $server, $vital, CACHE_QUARTER_HOUR);
+ Cache::set($cachekey_server . $server, $vital, CACHE_MINUTE);
}
if (!is_null($vital) && !$vital) {
QueueModel::removeItem($q_item['id']);
} else {
QueueModel::updateTime($q_item['id']);
- Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
+ Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
}
break;
case NETWORK_OSTATUS:
if ($deliver_status == -1) {
QueueModel::updateTime($q_item['id']);
- Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
+ Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
} else {
QueueModel::removeItem($q_item['id']);
}
QueueModel::removeItem($q_item['id']);
} else {
QueueModel::updateTime($q_item['id']);
- Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
+ Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
}
break;