aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Content_importer.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-27 21:58:26 +0000
committerMario <mario@mariovavti.com>2021-09-27 21:58:26 +0000
commit5eb79bd51efbd69d297bbd6f46ee9d1583ec694e (patch)
tree32f1fce8495644c9ad030dc784dd775752a48853 /Zotlabs/Daemon/Content_importer.php
parentd3f5f778a484aadfb4daed26f363e0658f86d9bf (diff)
downloadvolse-hubzilla-5eb79bd51efbd69d297bbd6f46ee9d1583ec694e.tar.gz
volse-hubzilla-5eb79bd51efbd69d297bbd6f46ee9d1583ec694e.tar.bz2
volse-hubzilla-5eb79bd51efbd69d297bbd6f46ee9d1583ec694e.zip
importer daemons: do not call with zap_compat flag and use return instead of kill so that queueworker can go on
Diffstat (limited to 'Zotlabs/Daemon/Content_importer.php')
-rw-r--r--Zotlabs/Daemon/Content_importer.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/Zotlabs/Daemon/Content_importer.php b/Zotlabs/Daemon/Content_importer.php
index adc180a2c..72b8e34ce 100644
--- a/Zotlabs/Daemon/Content_importer.php
+++ b/Zotlabs/Daemon/Content_importer.php
@@ -24,19 +24,19 @@ class Content_importer {
$channel = channelx_by_nick($channel_address);
if(! $channel) {
logger('itemhelper: channel not found');
- killme();
+ return;
}
- $headers = [
+ $headers = [
'X-API-Token' => random_string(),
- 'X-API-Request' => $hz_server . '/api/z/1.0/item/export_page?f=&zap_compat=1&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page ,
+ 'X-API-Request' => $hz_server . '/api/z/1.0/item/export_page?f=&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page ,
'Host' => $m['host'],
- '(request-target)' => 'get /api/z/1.0/item/export_page?f=&zap_compat=1&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page ,
+ '(request-target)' => 'get /api/z/1.0/item/export_page?f=&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page ,
];
$headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], channel_url($channel),true,'sha512');
- $x = z_fetch_url($hz_server . '/api/z/1.0/item/export_page?f=&zap_compat=1&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page,false,$redirects,[ 'headers' => $headers ]);
+ $x = z_fetch_url($hz_server . '/api/z/1.0/item/export_page?f=&since=' . urlencode($since) . '&until=' . urlencode($until) . '&page=' . $page,false,$redirects,[ 'headers' => $headers ]);
if(! $x['success']) {
logger('no API response',LOGGER_DEBUG);
@@ -46,14 +46,14 @@ class Content_importer {
$j = json_decode($x['body'],true);
if (! $j) {
- killme();
+ return;
}
- if(! ($j['item'] || count($j['item'])))
- killme();
+ if(! is_array($j['item']) || ! count($j['item']))
+ return;
import_items($channel,$j['item'],false,((array_key_exists('relocate',$j)) ? $j['relocate'] : null));
- killme();
+ return;
}
}