mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:50:12 +00:00
Inherit the creation date
This commit is contained in:
parent
f1119b4198
commit
4f70682f7a
3 changed files with 26 additions and 6 deletions
|
@ -11,13 +11,24 @@ function pubsubpublish_run(&$argv, &$argc){
|
|||
if ($argc > 1) {
|
||||
$pubsubpublish_id = intval($argv[1]);
|
||||
} else {
|
||||
// Inherit the creation time
|
||||
$queue = dba::select('workerqueue', array('created'), array('pid' => getmypid()), array('limit' => 1));
|
||||
if (dbm::is_result($queue)) {
|
||||
$process_created = $queue['created'];
|
||||
} else {
|
||||
// Normally this shouldn't happen.
|
||||
$process_created = datetime_convert();
|
||||
logger('no inherited priority! Something is wrong.');
|
||||
}
|
||||
|
||||
// We'll push to each subscriber that has push > 0,
|
||||
// i.e. there has been an update (set in notifier.php).
|
||||
$r = q("SELECT `id`, `callback_url` FROM `push_subscriber` WHERE `push` > 0");
|
||||
|
||||
foreach ($r as $rr) {
|
||||
logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG);
|
||||
proc_run(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'include/pubsubpublish.php', $rr["id"]);
|
||||
proc_run(array('priority' => PRIORITY_HIGH, 'created' => $process_created, 'dont_fork' => true),
|
||||
'include/pubsubpublish.php', $rr["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue