refactoring

This commit is contained in:
Saeed Vaziry
2023-08-04 18:28:04 +02:00
parent 8444323cf4
commit 643318fcfc
349 changed files with 3189 additions and 2729 deletions

View File

@ -2,11 +2,11 @@
namespace App\ServiceHandlers\ProcessManager;
use App\SSHCommands\ProcessManager\Supervisor\CreateWorkerCommand;
use App\SSHCommands\ProcessManager\Supervisor\DeleteWorkerCommand;
use App\SSHCommands\ProcessManager\Supervisor\RestartWorkerCommand;
use App\SSHCommands\ProcessManager\Supervisor\StartWorkerCommand;
use App\SSHCommands\ProcessManager\Supervisor\StopWorkerCommand;
use App\SSHCommands\Supervisor\CreateWorkerCommand;
use App\SSHCommands\Supervisor\DeleteWorkerCommand;
use App\SSHCommands\Supervisor\RestartWorkerCommand;
use App\SSHCommands\Supervisor\StartWorkerCommand;
use App\SSHCommands\Supervisor\StopWorkerCommand;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use Throwable;
@ -111,7 +111,7 @@ private function generateConfigFile(
int $numprocs,
string $logFile
): string {
$config = File::get(base_path('system/command-templates/supervisor/worker.conf'));
$config = File::get(resource_path('commands/supervisor/worker.conf'));
$config = Str::replace('__name__', (string) $id, $config);
$config = Str::replace('__command__', $command, $config);
$config = Str::replace('__user__', $user, $config);