coolify/app/Providers/AppServiceProvider.php
Andras Bacsai c8434acd0d fixes
2023-04-14 10:00:42 +02:00

40 lines
1.1 KiB
PHP

<?php
namespace App\Providers;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Support\Facades\Process;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
// @TODO: Is this the best place to run the seeder?
// if (env('APP_ENV') === 'production') {
// dump('Seed default data.');
// Process::run('php artisan db:seed --class=ProductionSeeder --force');
// } else {
// dump('Not in production environment.');
// }
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Queue::after(function (JobProcessed $event) {
// @TODO: Remove `coolify-builder` container after the remoteProcess job is finishged and remoteProcess->type == `deployment`.
if ($event->job->resolveName() === 'App\Jobs\ExecuteRemoteProcess') {
}
});
}
}