mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
Add workers to servers (#547)
This commit is contained in:
29
database/factories/WorkerFactory.php
Normal file
29
database/factories/WorkerFactory.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\WorkerStatus;
|
||||
use App\Models\Worker;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Worker>
|
||||
*/
|
||||
class WorkerFactory extends Factory
|
||||
{
|
||||
protected $model = Worker::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'php artisan queue:work',
|
||||
'user' => 'vito',
|
||||
'auto_start' => 1,
|
||||
'auto_restart' => 1,
|
||||
'numprocs' => 1,
|
||||
'redirect_stderr' => 1,
|
||||
'stdout_logfile' => 'file.log',
|
||||
'status' => WorkerStatus::CREATING,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user