Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions sync_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
$feeds = $sync->get_feed_list($userid);
if ((isset($feeds['success']) && $feeds['success']==false) || !is_array($feeds)) {
print "Error: could not load feeds\n";
$feeds = array();
// Exit rather than run with an empty feed list, which would never
// upload anything; the service manager restarts the script
exit(1);
}

// ------------------------------------------------
Expand Down Expand Up @@ -92,7 +94,14 @@
$upload_size = $r->upload_size;
}

$feeds = $sync->get_feed_list($userid);
$result = $sync->get_feed_list($userid);
if ((isset($result['success']) && $result['success']==false) || !is_array($result)) {
// Keep the reload flag set so that the reload is retried
print "Error: could not reload feeds, retrying in 60s\n";
sleep(60);
continue;
}
$feeds = $result;

$remote_id_map = array();
foreach ($feeds as $tagname=>$f) {
Expand Down