mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 09:54:44 +02:00
Use supervisorctl
instead of systemctl
when running in docker
This commit is contained in:
parent
e5cba893e4
commit
f6c8ab2974
@ -18,6 +18,17 @@ class QueueWorkerServiceCommand extends Command
|
|||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
|
if (@file_exists('/.dockerenv')) {
|
||||||
|
$result = Process::run('supervisorctl restart queue-worker');
|
||||||
|
if ($result->failed()) {
|
||||||
|
$this->error('Error restarting service: ' . $result->errorOutput());
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->line('Queue worker service file updated successfully.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
$serviceName = $this->option('service-name') ?? $this->ask('Queue worker service name', 'pelican-queue');
|
$serviceName = $this->option('service-name') ?? $this->ask('Queue worker service name', 'pelican-queue');
|
||||||
$path = '/etc/systemd/system/' . $serviceName . '.service';
|
$path = '/etc/systemd/system/' . $serviceName . '.service';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user