mirror of
https://github.com/friendica/friendica
synced 2024-11-13 03:02:53 +00:00
We have to delete spool files after posting in any case
This commit is contained in:
parent
ce953e5882
commit
03653072a2
1 changed files with 8 additions and 2 deletions
|
@ -35,13 +35,19 @@ function spool_post_run($argv, $argc) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$arr = json_decode(file_get_contents($fullfile), true);
|
$arr = json_decode(file_get_contents($fullfile), true);
|
||||||
|
|
||||||
|
// If it isn't an array then it is no spool file
|
||||||
if (!is_array($arr)) {
|
if (!is_array($arr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$result = item_store($arr);
|
|
||||||
if ($result == 0) {
|
// Skip if it doesn't seem to be an item array
|
||||||
|
if (!isset($arr['uid']) AND !isset($arr['uri']) AND !isset($arr['network'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result = item_store($arr);
|
||||||
|
|
||||||
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
||||||
unlink($fullfile);
|
unlink($fullfile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue