modify
This commit is contained in:
@@ -56,10 +56,8 @@ class Application extends BaseApplication
|
|||||||
$this->import(DatabasesProviders::class);
|
$this->import(DatabasesProviders::class);
|
||||||
$this->import(ServerProviders::class);
|
$this->import(ServerProviders::class);
|
||||||
|
|
||||||
if (Config::get('crontab.enable') !== true) {
|
|
||||||
$this->import(CrontabProviders::class);
|
$this->import(CrontabProviders::class);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,11 +23,10 @@ class CrontabProviders extends Providers
|
|||||||
public function onImport(Application $application)
|
public function onImport(Application $application)
|
||||||
{
|
{
|
||||||
$server = $application->getServer();
|
$server = $application->getServer();
|
||||||
|
$application->set('crontab', ['class' => Producer::class]);
|
||||||
if (Config::get('crontab.enable') !== true) {
|
if (Config::get('crontab.enable') !== true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$application->set('crontab', ['class' => Producer::class]);
|
|
||||||
|
|
||||||
$server->addProcess('CrontabZookeeper', ZookeeperProcess::class);
|
$server->addProcess('CrontabZookeeper', ZookeeperProcess::class);
|
||||||
$server->addProcess('Consumer', Consumer::class);
|
$server->addProcess('Consumer', Consumer::class);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user