1
0
Fork 0
mirror of synced 2024-05-20 20:52:36 +12:00
appwrite/app/tasks/maintenance.php

19 lines
440 B
PHP
Raw Normal View History

2020-12-15 05:39:44 +13:00
<?php
global $cli;
use Utopia\App;
use Utopia\CLI\Console;
$cli
->task('maintenance')
->desc('Schedules maintenance tasks and publishes them to resque')
->action(function () {
$interval = App::getEnv('_APP_MAINTENANCE_INTERVAL', '');
for($i = 0; $i <= 10; ++$i){
Console::log('Starting the maintenance worker every '.$interval.' seconds');
sleep($interval);
}
});