mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 06:24:44 +02:00
Installer followup (#519)
* remove queue worker service creation from installer * auto check redis
This commit is contained in:
parent
496eaaaf83
commit
953ee940aa
@ -14,7 +14,6 @@ class QueueWorkerServiceCommand extends Command
|
||||
{--service-name= : Name of the queue worker service.}
|
||||
{--user= : The user that PHP runs under.}
|
||||
{--group= : The group that PHP runs under.}
|
||||
{--use-redis : Whether redis is used.}
|
||||
{--overwrite : Force overwrite if the service file already exists.}';
|
||||
|
||||
public function handle(): void
|
||||
@ -32,7 +31,8 @@ class QueueWorkerServiceCommand extends Command
|
||||
$user = $this->option('user') ?? $this->ask('Webserver User', 'www-data');
|
||||
$group = $this->option('group') ?? $this->ask('Webserver Group', 'www-data');
|
||||
|
||||
$afterRedis = $this->option('use-redis') ? '
|
||||
$redisUsed = config('queue.default') === 'redis' || config('session.driver') === 'redis' || config('cache.default') === 'redis';
|
||||
$afterRedis = $redisUsed ? '
|
||||
After=redis-server.service' : '';
|
||||
|
||||
$basePath = base_path();
|
||||
|
@ -99,18 +99,6 @@ class PanelInstaller extends SimplePage implements HasForms
|
||||
$variables = array_get($inputs, 'env');
|
||||
$this->writeToEnvironment($variables);
|
||||
|
||||
$redisUsed = count(collect($variables)->filter(function ($item) {
|
||||
return $item === 'redis';
|
||||
})) !== 0;
|
||||
|
||||
// Create queue worker service (if needed)
|
||||
if ($variables['QUEUE_CONNECTION'] !== 'sync') {
|
||||
Artisan::call('p:environment:queue-service', [
|
||||
'--use-redis' => $redisUsed,
|
||||
'--overwrite' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
// Run migrations
|
||||
Artisan::call('migrate', [
|
||||
'--force' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user