lasthourcloud/app/Providers/AppServiceProvider.php

34 lines
949 B
PHP
Raw Normal View History

2023-03-17 14:33:48 +00:00
<?php
namespace App\Providers;
2023-05-03 06:24:34 +00:00
use App\Jobs\CoolifyTask;
2023-03-30 07:47:04 +00:00
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Support\Facades\Queue;
2023-03-17 14:33:48 +00:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
2023-05-09 12:46:22 +00:00
// if (config('app.env') === 'production' && Str::contains(config('version'), ['nightly'])) {
2023-05-03 08:24:13 +00:00
// Process::run('php artisan migrate:fresh --force --seed --seeder=ProductionSeeder');
// }
2023-03-17 14:33:48 +00:00
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Queue::after(function (JobProcessed $event) {
2023-05-24 13:25:08 +00:00
// @TODO: Remove `coolify-builder` container after the remote_process job is finishged and remote_process->type == `deployment`.
2023-05-03 06:24:34 +00:00
if ($event->job->resolveName() === CoolifyTask::class) {
}
});
2023-03-17 14:33:48 +00:00
}
}