1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00
appwrite/app/tasks/maintenance.php
2020-12-14 22:09:44 +05:30

19 lines
440 B
PHP

<?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);
}
});