X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcron.php;h=0e587784404bb515b71f3960a00b5c9c2b6925be;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=70b87e969618cac8dbbbc9b87a727e8e657e81cc;hpb=f4652d6e5026abe7d7b352d2307622bd567aa433;p=friendica.git diff --git a/include/cron.php b/include/cron.php index 70b87e9696..0e58778440 100644 --- a/include/cron.php +++ b/include/cron.php @@ -82,6 +82,9 @@ function cron_run(&$argv, &$argc){ proc_run(PRIORITY_MEDIUM, 'include/dbclean.php'); proc_run(PRIORITY_LOW, "include/cronjobs.php", "update_photo_albums"); + + // Delete all done workerqueue entries + dba::e('DELETE FROM `workerqueue` WHERE `done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR'); } // Poll contacts @@ -186,7 +189,7 @@ function cron_poll_contacts($argc, $argv) { $contact['priority'] = 2; } - if ($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) { + if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) { /* * We should be getting everything via a hub. But just to be sure, let's check once a day. * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately) @@ -197,7 +200,7 @@ function cron_poll_contacts($argc, $argv) { $contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3); } - if (($contact['priority'] >= 0) AND !$force) { + if (($contact['priority'] >= 0) && !$force) { $update = false; $t = $contact['last-update']; @@ -245,7 +248,7 @@ function cron_poll_contacts($argc, $argv) { logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact["nick"] . " " . $contact["name"]); - if (($contact['network'] == NETWORK_FEED) AND ($contact['priority'] <= 3)) { + if (($contact['network'] == NETWORK_FEED) && ($contact['priority'] <= 3)) { $priority = PRIORITY_MEDIUM; } else { $priority = PRIORITY_LOW;