aboutsummaryrefslogtreecommitdiffstats
path: root/include/onepoll.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-29 19:28:19 -0800
committerfriendica <info@friendica.com>2013-01-29 19:28:19 -0800
commite270bd3874bb4526138cc06cd26e2a1153778894 (patch)
tree3f58cbb7fd464421423fb250423d4781c80f036b /include/onepoll.php
parentfb9ccf5d1b39fc060c5752d28f89daf2378610d3 (diff)
downloadvolse-hubzilla-e270bd3874bb4526138cc06cd26e2a1153778894.tar.gz
volse-hubzilla-e270bd3874bb4526138cc06cd26e2a1153778894.tar.bz2
volse-hubzilla-e270bd3874bb4526138cc06cd26e2a1153778894.zip
mark for death implemented
Diffstat (limited to 'include/onepoll.php')
-rw-r--r--include/onepoll.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/onepoll.php b/include/onepoll.php
index f025aaf86..8b0c5211b 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -33,7 +33,6 @@ function onepoll_run($argv, $argc){
$d = datetime_convert();
-dbg(1);
$contacts = q("SELECT abook.*, xchan.*, account.*
FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan
where abook_id = %d
@@ -45,7 +44,6 @@ dbg(1);
intval(ACCOUNT_OK),
intval(ACCOUNT_UNVERIFIED)
);
-dbg(0);
if(! $contacts) {
logger('onepoll: abook_id not found: ' . $contact_id);
@@ -79,21 +77,21 @@ dbg(0);
$x = zot_refresh($contact,$importer);
$responded = false;
-
+ $updated = datetime_convert();
if(! $x) {
- // mark for death
-
+ // mark for death by not updating abook_connected, this is caught in include/poller.php
+ q("update abook set abook_updated = '%s' where abook_id = %d limit 1",
+ dbesc($updated),
+ intval($contact['abook_id'])
+ );
}
else {
q("update abook set abook_updated = '%s', abook_connected = '%s' where abook_id = %d limit 1",
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
+ dbesc($updated),
+ dbesc($updated),
intval($contact['abook_id'])
);
$responded = true;
-
- // if marked for death, reset
-
}
if(! $responded)