use Friendica\Core\Worker;
use dba;
+require_once 'include/dba.php';
+
class DBClean {
public static function execute($stage = 0) {
return;
}
- // Get the expire days for step 8 and 9
- $days = Config::get('system', 'dbclean-expire-days', 0);
-
if ($stage == 0) {
self::forkCleanProcess();
} else {
* @brief Fork the different DBClean processes
*/
private static function forkCleanProcess() {
+ // Get the expire days for step 8 and 9
+ $days = Config::get('system', 'dbclean-expire-days', 0);
+
for ($i = 1; $i <= 10; $i++) {
// Execute the background script for a step when it isn't finished.
// Execute step 8 and 9 only when $days is defined.
Config::set('system', 'dbclean-last-id-10', $last_id);
}
-
- // Call it again if not all entries were purged
- //if ($count > 0) {
- // Worker::add(PRIORITY_MEDIUM, 'DBClean');
- //}
}
}