]> git.mxchange.org Git - friendica.git/blobdiff - include/cron.php
Merge pull request #3604 from annando/bugfix-acl
[friendica.git] / include / cron.php
index 76f3e410196185514b9c24a12ef8ff3c6d8e8d62..eda88dbcd3f17e307bfebcff6fd35308a5d5ced2 100644 (file)
@@ -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
@@ -250,7 +253,7 @@ function cron_poll_contacts($argc, $argv) {
                        } else {
                                $priority = PRIORITY_LOW;
                        }
-                       proc_run(array('priority' => $priority, 'dont_fork' => true), 'include/onepoll.php', intval($contact['id']));
+                       proc_run(array('priority' => $priority, 'dont_fork' => true), 'include/onepoll.php', (int)$contact['id']);
                }
        }
 }