]> git.mxchange.org Git - friendica.git/blobdiff - include/dbclean.php
proc_run was replaced
[friendica.git] / include / dbclean.php
index bc41bead2d31841cb474c50c3b5a3093da0b144c..1e1dd908290ec045cd8166b7b0565210116e243f 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 use Friendica\Core\Config;
+use Friendica\Core\Worker;
 
 function dbclean_run(&$argv, &$argc) {
        if (!Config::get('system', 'dbclean', false)) {
@@ -25,7 +26,7 @@ function dbclean_run(&$argv, &$argc) {
                        // Execute the background script for a step when it isn't finished.
                        // Execute step 8 and 9 only when $days is defined.
                        if (!Config::get('system', 'finished-dbclean-'.$i, false) && (($i < 8) || ($days > 0))) {
-                               proc_run(PRIORITY_LOW, 'include/dbclean.php', $i);
+                               Worker::add(PRIORITY_LOW, 'dbclean', $i);
                        }
                }
        } else {
@@ -297,6 +298,6 @@ function remove_orphans($stage = 0) {
 
        // Call it again if not all entries were purged
        if (($stage != 0) && ($count > 0)) {
-               proc_run(PRIORITY_MEDIUM, 'include/dbclean.php');
+               Worker::add(PRIORITY_MEDIUM, 'dbclean');
        }
 }