mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
# Conflicts: # app/Console/Commands/SetupDevEnvironment.php # app/Console/Kernel.php # app/Http/Resources/InvoiceResource.php # app/Http/Resources/UserResource.php # app/Models/User.php # composer.lock # config/app.php # config/custom-language-translations.php # config/language-translations.php # public/chunks/admin.js # public/chunks/app-language.js # public/chunks/dashboard.js # public/chunks/files.js # public/chunks/files~chunks/shared-files~chunks/shared/file-browser.js # public/chunks/files~chunks/shared-files~chunks/shared/file-browser~chunks/shared/single-file.js # public/chunks/invoices.js # public/chunks/pages.js # public/chunks/plan-subscribers.js # public/chunks/plans.js # public/chunks/platform.js # public/chunks/settings-invoices.js # public/chunks/settings-payment-methods.js # public/chunks/settings-subscription.js # public/chunks/shared-files.js # public/chunks/shared.js # public/chunks/shared/file-browser.js # public/chunks/user-invoices.js # public/chunks/user-subscription.js # public/chunks/users.js # public/js/main.js # public/mix-manifest.json # resources/js/components/FilesView/FileItemGrid.vue # resources/js/components/FilesView/FileItemList.vue
78 lines
2.0 KiB
PHP
78 lines
2.0 KiB
PHP
<?php
|
|
namespace App\Console;
|
|
|
|
use App\Services\SchedulerService;
|
|
use App\Services\Oasis\OasisService;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use App\Console\Commands\SetupDevEnvironment;
|
|
use App\Console\Commands\SetupProdEnvironment;
|
|
use App\Console\Commands\SetupOasisEnvironment;
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
class Kernel extends ConsoleKernel
|
|
{
|
|
/**
|
|
* The Artisan commands provided by your application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $commands = [
|
|
SetupDevEnvironment::class,
|
|
SetupProdEnvironment::class,
|
|
SetupOasisEnvironment::class,
|
|
];
|
|
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
$scheduler = resolve(SchedulerService::class);
|
|
|
|
$schedule->call(function () use ($scheduler) {
|
|
$scheduler->delete_expired_shared_links();
|
|
})->everyTenMinutes();
|
|
|
|
$schedule->call(function () use ($scheduler) {
|
|
$scheduler->delete_old_zips();
|
|
|
|
if (! is_storage_driver(['local'])) {
|
|
$scheduler->delete_failed_files();
|
|
}
|
|
})->everySixHours();
|
|
|
|
// Oasis Drive
|
|
$schedule->call(function () {
|
|
resolve(OasisService::class)->order_reminder();
|
|
})->hourly();
|
|
|
|
// Run queue jobs every minute
|
|
$schedule->command('queue:work --stop-when-empty')
|
|
->everyMinute()
|
|
->withoutOverlapping();
|
|
|
|
// Backup app database daily
|
|
$schedule->command('backup:clean')
|
|
->daily()
|
|
->at('01:00');
|
|
$schedule->command('backup:run --only-db')
|
|
->daily()
|
|
->at('01:30');
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__ . '/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|